mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-23 01:45:50 +03:00
makeifle: clean and test workflows
This commit is contained in:
parent
eb5c0164dc
commit
2e50c263a8
4 changed files with 42 additions and 39 deletions
3
.github/workflows/coverage.yml
vendored
3
.github/workflows/coverage.yml
vendored
|
@ -86,6 +86,9 @@ jobs:
|
|||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
- name: build frontend
|
||||
run: make frontend
|
||||
|
||||
- name: Generate coverage file
|
||||
if: matrix.version == '1.51.0' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
||||
uses: actions-rs/tarpaulin@v0.1
|
||||
|
|
3
.github/workflows/linux.yml
vendored
3
.github/workflows/linux.yml
vendored
|
@ -78,6 +78,9 @@ jobs:
|
|||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
- name: build frontend
|
||||
run: make frontend
|
||||
|
||||
- name: run tests
|
||||
run: make test
|
||||
env:
|
||||
|
|
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -579,7 +579,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "cache-buster"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/realaravinth/cache-buster#3cf8828ab80b72037d23f5ce12b5879e44534da3"
|
||||
source = "git+https://github.com/realaravinth/cache-buster#8e630d8e4574e2f42d616e4daba425ba33859e59"
|
||||
dependencies = [
|
||||
"data-encoding",
|
||||
"derive_builder",
|
||||
|
|
73
Makefile
73
Makefile
|
@ -1,8 +1,14 @@
|
|||
default: frontend
|
||||
cargo build
|
||||
|
||||
run: frontend
|
||||
cargo run
|
||||
clean:
|
||||
cargo clean
|
||||
rm ./src/cache_buster_data.json || true
|
||||
rm -rf ./static/cache/bundle || true
|
||||
|
||||
coverage: migrate
|
||||
cd browser && cargo tarpaulin -t 1200 --out Html
|
||||
cargo tarpaulin -t 1200 --out Html
|
||||
|
||||
dev-env:
|
||||
cargo fetch
|
||||
|
@ -13,42 +19,6 @@ doc:
|
|||
cargo doc --no-deps --workspace --all-features
|
||||
cd browser && cargo doc --no-deps --workspace --all-features
|
||||
|
||||
frontend:
|
||||
cd browser && wasm-pack build --release
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
test: migrate
|
||||
cd browser && wasm-pack test --release --headless --chrome
|
||||
cd browser && wasm-pack test --release --headless --firefox
|
||||
cargo test --all --all-features --no-fail-fast
|
||||
${MAKE} frontend-test
|
||||
|
||||
frontend-test:
|
||||
cd browser && wasm-pack test --release --headless --chrome
|
||||
cd browser && wasm-pack test --release --headless --firefox
|
||||
yarn test
|
||||
|
||||
a:
|
||||
echo a
|
||||
b:
|
||||
${MAKE} a
|
||||
|
||||
xml-test-coverage: migrate
|
||||
cd browser && cargo tarpaulin -t 1200 --out Xml
|
||||
cargo tarpaulin -t 1200 --out Xml
|
||||
|
||||
coverage: migrate
|
||||
cd browser && cargo tarpaulin -t 1200 --out Html
|
||||
cargo tarpaulin -t 1200 --out Html
|
||||
|
||||
release: frontend
|
||||
cargo build --release
|
||||
|
||||
clean:
|
||||
cargo clean
|
||||
yarn clean
|
||||
|
||||
docker-build:
|
||||
docker build -t mcaptcha/mcaptcha:master -t mcaptcha/mcaptcha:latest .
|
||||
|
||||
|
@ -56,9 +26,36 @@ docker-publish: docker-build
|
|||
docker push mcaptcha/mcaptcha:master
|
||||
docker push mcaptcha/mcaptcha:latest
|
||||
|
||||
frontend:
|
||||
cd browser && wasm-pack build --release
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
frontend-test:
|
||||
cd browser && wasm-pack test --release --headless --chrome
|
||||
cd browser && wasm-pack test --release --headless --firefox
|
||||
yarn test
|
||||
|
||||
migrate:
|
||||
cargo run --bin tests-migrate
|
||||
|
||||
release: frontend
|
||||
cargo build --release
|
||||
|
||||
run: frontend
|
||||
cargo run
|
||||
|
||||
test: migrate
|
||||
cd browser && wasm-pack test --release --headless --chrome
|
||||
cd browser && wasm-pack test --release --headless --firefox
|
||||
${MAKE} frontend-test
|
||||
${MAKE} frontend
|
||||
cargo test --all --all-features --no-fail-fast
|
||||
|
||||
xml-test-coverage: migrate
|
||||
cd browser && cargo tarpaulin -t 1200 --out Xml
|
||||
cargo tarpaulin -t 1200 --out Xml
|
||||
|
||||
help:
|
||||
@echo ' clean - drop builds and environments'
|
||||
@echo ' coverage - build test coverage in HTML format'
|
||||
|
|
Loading…
Reference in a new issue