mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2024-11-23 01:45:50 +03:00
makeifle: make migrate
This commit is contained in:
parent
5fa668ad97
commit
eb5c0164dc
3 changed files with 15 additions and 7 deletions
10
.github/workflows/coverage.yml
vendored
10
.github/workflows/coverage.yml
vendored
|
@ -81,9 +81,17 @@ jobs:
|
|||
- name: Run the frontend tests
|
||||
run: make frontend-test
|
||||
|
||||
- name: Run migrations
|
||||
run: make migrate
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
- name: Generate coverage file
|
||||
if: matrix.version == '1.51.0' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
||||
run: make xml-test-coverage
|
||||
uses: actions-rs/tarpaulin@v0.1
|
||||
with:
|
||||
version: '0.15.0'
|
||||
args: '-t 1200'
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
# GIT_HASH is dummy value. I guess build.rs is skipped in tarpaulin
|
||||
|
|
2
.github/workflows/linux.yml
vendored
2
.github/workflows/linux.yml
vendored
|
@ -69,7 +69,7 @@ jobs:
|
|||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
|
||||
- name: Run migrations
|
||||
run: make migrations
|
||||
run: make migrate
|
||||
env:
|
||||
DATABASE_URL: postgres://postgres:password@localhost:5432/postgres
|
||||
|
||||
|
|
10
Makefile
10
Makefile
|
@ -18,7 +18,7 @@ frontend:
|
|||
yarn install
|
||||
yarn build
|
||||
|
||||
test: migrations
|
||||
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
|
||||
|
@ -34,11 +34,11 @@ a:
|
|||
b:
|
||||
${MAKE} a
|
||||
|
||||
xml-test-coverage: migrations
|
||||
xml-test-coverage: migrate
|
||||
cd browser && cargo tarpaulin -t 1200 --out Xml
|
||||
cargo tarpaulin -t 1200 --out Xml
|
||||
|
||||
coverage: migrations
|
||||
coverage: migrate
|
||||
cd browser && cargo tarpaulin -t 1200 --out Html
|
||||
cargo tarpaulin -t 1200 --out Html
|
||||
|
||||
|
@ -56,7 +56,7 @@ docker-publish: docker-build
|
|||
docker push mcaptcha/mcaptcha:master
|
||||
docker push mcaptcha/mcaptcha:latest
|
||||
|
||||
migrations:
|
||||
migrate:
|
||||
cargo run --bin tests-migrate
|
||||
|
||||
help:
|
||||
|
@ -68,7 +68,7 @@ help:
|
|||
@echo ' doc - build documentation'
|
||||
@echo ' frontend - build static assets in prod mode'
|
||||
@echo ' frontend-test - run frontend tests'
|
||||
@echo ' migrations - run database migrations'
|
||||
@echo ' migrate - run database migrations'
|
||||
@echo ' run - run developer instance'
|
||||
@echo ' test - run unit and integration tests'
|
||||
@echo ' xml-coverage - build test coverage in XML for upload to codecov'
|
||||
|
|
Loading…
Reference in a new issue