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

Build ndc-postgres and v3-engine binaries using Nix in e2e tests #592

Merged
merged 1 commit into from
Aug 23, 2024
Merged
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
56 changes: 30 additions & 26 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Install `just`
uses: extractions/setup-just@v2
- name: Install Nix ❄
uses: cachix/install-nix-action@V27
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to GitHub Container Registry 📦
uses: docker/login-action@v3
- name: Set up the Nix Cache 🔌
uses: cachix/cachix-action@v15
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
name: hasura-v3-dev
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}

- name: Install `just`
uses: extractions/setup-just@v2

- name: Check out ndc-postgres
uses: actions/checkout@v4
Expand All @@ -38,36 +42,36 @@ jobs:
path: v3-e2e-testing
token: ${{ secrets.HASURA_BOT_TOKEN }}

- name: Install ndc-postgres tools
working-directory: ndc-postgres
run: rustup show

- name: Install v3-engine tools
working-directory: v3-engine
run: rustup show
- name: Cache v3-e2e-testing compilation
uses: Swatinem/rust-cache@v2
with:
workspaces: "v3-e2e-testing"
shared-key: "build-v3-e2e-testing"

- name: Install v3-e2e-testing tools
working-directory: v3-e2e-testing
run: rustup show

- uses: Swatinem/rust-cache@v2
with:
workspaces: |
ndc-postgres
v3-engine
v3-e2e-testing
- name: Build v3-engine
working-directory: v3-engine
run: nix build .

- name: Build ndc-postgres
working-directory: ndc-postgres
run: cargo build

- name: Build v3-engine
working-directory: v3-engine
run: cargo build
run: nix build .

- name: Run the tests
working-directory: v3-e2e-testing
run: just test-postgres
env:
ENGINE_BINARY: >-
${{ github.workspace }}/v3-engine/result/bin/engine
NDC_POSTGRES_BINARY: >-
${{ github.workspace }}/ndc-postgres/result/bin/ndc-postgres
run: |
npm install
just start-postgres-dependencies start-apollo-subgraph
trap 'just stop-everything' EXIT
RUST_LOG=DEBUG ./crates/postgres/static/run-postgres-tests.sh '.*' "$NDC_POSTGRES_BINARY" "$ENGINE_BINARY"
Comment on lines +65 to +74
Copy link
Contributor

@soupi soupi Aug 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That doesn't look right.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah sorry, this is e2e-tests.


- name: Upload logs
if: always()
Expand Down