mirror of https://github.com/realaravinth/gitpad
fix: lints and run migrations before generating coverage in CI
parent
34a67a5535
commit
915fb46445
|
@ -57,6 +57,13 @@ jobs:
|
|||
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV \
|
||||
&& echo "SQLITE_DATABASE_URL=$SQLITE_DATABASE_URL" >> $GITHUB_ENV
|
||||
|
||||
- name: run migrations
|
||||
run: make migrate
|
||||
env:
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
- name: Generate coverage file
|
||||
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
||||
uses: actions-rs/tarpaulin@v0.1
|
||||
|
@ -68,7 +75,7 @@ jobs:
|
|||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
with:
|
||||
args: "--all-features --no-fail-fast --workspace=database/db-sqlx-postgres,. -t 1200"
|
||||
args: "--all-features --no-fail-fast --workspace=database/db-sqlx-postgres,database/db-sqlx-sqlite,. -t 1200"
|
||||
|
||||
- name: Upload to Codecov
|
||||
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
||||
|
|
|
@ -51,7 +51,7 @@ async fn protected_routes_work(data: Arc<Data>, db: BoxDB) {
|
|||
|
||||
let _ = data.delete_user(db, NAME, PASSWORD).await;
|
||||
|
||||
let ( _, signin_resp) = data.register_and_signin(db, NAME, EMAIL, PASSWORD).await;
|
||||
let (_, signin_resp) = data.register_and_signin(db, NAME, EMAIL, PASSWORD).await;
|
||||
let cookies = get_cookie!(signin_resp);
|
||||
let app = get_app!(data, db).await;
|
||||
|
||||
|
|
Loading…
Reference in New Issue