Skip to content

Commit e0e7aa2

Browse files
committed
Setup tests once
1 parent 356c5cc commit e0e7aa2

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

.github/actions/edgedb-teardown/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ runs:
66
shell: bash
77
run: |
88
edgedb branch switch main
9-
edgedb branch drop github_$GITHUB_RUN_ID --non-interactive
9+
edgedb branch drop github_$GITHUB_RUN_ID --non-interactive || true

.github/workflows/test.yml

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ on:
77
- develop
88

99
jobs:
10-
Unit:
10+
Setup:
1111
runs-on: ubuntu-latest
12-
1312
steps:
1413
- uses: actions/checkout@v4
1514
- name: Node Setup & Yarn Install
@@ -20,16 +19,41 @@ jobs:
2019
with:
2120
dsn: ${{ secrets.EDGEDB_DSN }}
2221

23-
- name: Tests
24-
run: yarn test --reporters=github-actions
22+
- name: Zip files
23+
run: tar -cf src.tar .
24+
shell: bash
25+
26+
- uses: actions/upload-artifact@v4
27+
with:
28+
name: src
29+
path: src.tar
30+
retention-days: 1
2531

2632
- name: EdgeDB Teardown
2733
uses: ./.github/actions/edgedb-teardown
2834
if: always()
2935

36+
Unit:
37+
runs-on: ubuntu-latest
38+
needs: Setup
39+
40+
steps:
41+
- uses: actions/download-artifact@v4
42+
with:
43+
name: src
44+
path: .
45+
46+
- name: Unzip files
47+
run: tar -xf src.tar
48+
shell: bash
49+
50+
- name: Tests
51+
run: yarn test --reporters=github-actions
52+
3053
E2E:
3154
name: E2E Tests (${{ matrix.database }} ${{ matrix.shard }}/6)
3255
runs-on: ubuntu-latest
56+
needs: Setup
3357

3458
services:
3559
neo4j:
@@ -56,22 +80,14 @@ jobs:
5680
database: [neo4j, edgedb]
5781
fail-fast: false
5882
steps:
59-
- uses: actions/checkout@v4
60-
- name: Node Setup & Yarn Install
61-
uses: ./.github/actions/setup
62-
63-
- name: EdgeDB Setup
64-
uses: ./.github/actions/edgedb-setup
83+
- uses: actions/download-artifact@v4
6584
with:
66-
dsn: ${{ secrets.EDGEDB_DSN }}
85+
name: src
86+
path: .
6787

6888
- name: E2E Tests
6989
run: yarn test:e2e --shard=${{ matrix.shard }}/6 --reporters=github-actions
7090
env:
7191
NEO4J_VERSION: ${{ matrix.neo4j-version }}
7292
DATABASE: ${{ matrix.database }}
7393
continue-on-error: ${{ matrix.database == 'edgedb' }}
74-
75-
- name: EdgeDB Teardown
76-
uses: ./.github/actions/edgedb-teardown
77-
if: always()

0 commit comments

Comments
 (0)