Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use nix for gh actions test #541

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading