Skip to content

Commit

Permalink
fix(ci): run sqlx for contract and component tests
Browse files Browse the repository at this point in the history
Don't really like that; more work...
but I guess it makes sense. I wonder if you can skip them
  • Loading branch information
jasonribble committed Oct 3, 2024
1 parent dbfc560 commit 380996a
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,21 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run integration

- name: Install sqlx-cli
run: cargo install sqlx-cli

- name: Create database
run: sqlx database create
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Run migrations
run: sqlx migrate run
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Run component tests
run: cargo test --test component
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
Expand All @@ -70,7 +84,21 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run integration

- name: Install sqlx-cli
run: cargo install sqlx-cli

- name: Create database
run: sqlx database create
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Run migrations
run: sqlx migrate run
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

- name: Run contract tests
run: cargo test --test contract
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
Expand Down

0 comments on commit 380996a

Please sign in to comment.