Skip to content

Commit

Permalink
consolidate
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Dec 22, 2023
1 parent 5c43079 commit 347dcff
Showing 1 changed file with 5 additions and 27 deletions.
32 changes: 5 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,44 +7,22 @@ on:
pull_request:

jobs:
sqlx-prepare:
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: Swatinem/rust-cache@v2
- run: nix develop -c cargo install sqlx-cli --version 0.6.3 --no-default-features --features rustls --features mysql
- run: nix develop -c bash -c "cd dwn-server && cargo sqlx prepare"
- run: nix develop -c bash -c "cd dwn-server && cargo sqlx prepare -- --tests"
- uses: actions/upload-artifact@v4
with:
name: sqlx
path: .sqlx
- uses: EndBug/add-and-commit@v9
with:
message: "chore: sqlx prepare"
default_author: github_actions

check:
needs: sqlx-prepare
runs-on: ubuntu-latest
env:
SQLX_OFFLINE: true
DATABASE_URL: ${{ secrets.DATABASE_URL }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: Swatinem/rust-cache@v2
- uses: actions/download-artifact@v4
with:
name: sqlx
path: .sqlx
- run: nix flake check --all-systems
- run: nix develop -c cargo doc --workspace --all-features --no-deps --document-private-items
- run: nix develop -c cargo test --workspace --all-features --features sqlx/offline
- run: nix develop -c cargo install sqlx-cli --version 0.6.3 --no-default-features --features rustls --features mysql
- run: nix develop -c bash -c "cd dwn-server && cargo sqlx prepare"
- run: nix develop -c bash -c "cd dwn-server && cargo sqlx prepare -- --tests"
- run: SQLX_OFFLINE=true nix develop -c cargo test --workspace --all-features --features sqlx/offline

lint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 347dcff

Please sign in to comment.