Skip to content

Commit

Permalink
run api and non-api tests separately
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Jul 30, 2024
1 parent b2d9409 commit f03affb
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Run Tests
test_api:
name: Run API Tests
runs-on: ubuntu-latest
services:
postgres:
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: sqlx-${{ env.SQLX_VERSION }}
key: sqlx
- name: Install sqlx-cli
run: cargo install sqlx-cli
--features native-tls,postgres
Expand All @@ -38,9 +38,27 @@ jobs:
- name: Run api tests
run: |
cargo test
test_non_api:
name: Run non-API Tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
key: sqlx
- name: Run non-api tests
run: |
cd ..
cargo test --workspace --exclude api
fmt:
Expand Down

0 comments on commit f03affb

Please sign in to comment.