-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (67 loc) · 2.21 KB
/
e2e-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Postgres E2E tests
on:
push:
jobs:
run_postgres_e2es:
name: Run Postgres E2Es
runs-on: ubuntu-latest
steps:
- name: Install Nix ❄
uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up the Nix Cache 🔌
uses: cachix/cachix-action@v15
with:
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
with:
path: ndc-postgres
- name: Check out v3-engine
uses: actions/checkout@v4
with:
repository: hasura/v3-engine
path: v3-engine
token: ${{ secrets.HASURA_BOT_TOKEN }}
- name: Check out v3-e2e-testing
uses: actions/checkout@v4
with:
repository: hasura/v3-e2e-testing
path: v3-e2e-testing
token: ${{ secrets.HASURA_BOT_TOKEN }}
- 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
- name: Build v3-engine
working-directory: v3-engine
run: nix build .
- name: Build ndc-postgres
working-directory: ndc-postgres
run: nix build .
- name: Run the tests
working-directory: v3-e2e-testing
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"
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs
path: v3-e2e-testing/crates/postgres/static/logs