Skip to content

Commit

Permalink
feat: use nix for gh actions test
Browse files Browse the repository at this point in the history
  • Loading branch information
thevaibhav-dixit committed Apr 30, 2024
1 parent 40dd2fa commit c0f725c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 37 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,12 @@ jobs:
name: End to End Test
runs-on: ubuntu-latest
steps:
- name: Setup BATS
uses: mig4/setup-bats@v1
with:
bats-version: 1.9.0
- name: Install protoc dependencies for prost-wkt-types
run: sudo apt-get install -y protobuf-compiler libprotobuf-dev
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: actions/checkout@v3
- name: Setup cache for cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run e2e tests
env:
PG_CON: postgres://user:password@127.0.0.1:5432/pg
run: make e2e
run: nix develop -c make e2e
25 changes: 5 additions & 20 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,12 @@ jobs:
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
- name: Run the Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@v2
- uses: actions/checkout@v3
- name: Install sqlx-cli
uses: baptiste0928/cargo-install@v2
with:
crate: sqlx-cli
version: "^0.7.1"
- name: Install nextest
uses: baptiste0928/cargo-install@v2
with:
crate: cargo-nextest
- name: Setup cache for cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run integration tests
env:
PG_CON: postgres://user:password@127.0.0.1:5432/pg
run: make test-in-ci
run: nix develop -c make test-in-ci

0 comments on commit c0f725c

Please sign in to comment.