Skip to content

Commit c3bea33

Browse files
authored
Merge pull request #1811 from NASA-AMMOS/refactor/speed-up-github-e2eTests
Split E2E Test tasks into multiple subtasks
2 parents 01084de + 75fcec8 commit c3bea33

16 files changed

Lines changed: 283 additions & 104 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Load NPM Cache
2+
description: Load cached npm package data into the global npm cache
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Cache global ~/.npm cache
7+
uses: actions/cache@v5
8+
with:
9+
path: ~/.npm
10+
key: npm-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
11+
restore-keys: |
12+
npm-${{ runner.os }}-
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Shutdown Test Backend
2+
description: Shuts down and prints logs for the E2E Test Backend
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Print Logs for Services
7+
if: always()
8+
shell: bash
9+
run: docker compose -f ./e2e-tests/docker-compose-test.yml logs -t
10+
- name: Stop Services
11+
if: always()
12+
shell: bash
13+
run: |
14+
docker ps -a
15+
docker compose -f ./e2e-tests/docker-compose-test.yml down
16+
docker ps -a
17+
- name: Prune Volumes
18+
if: always()
19+
shell: bash
20+
run: docker volume prune --force
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Start Test Backend
2+
description: Compile and start up the backend for E2E Tests
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Extract PlanDev gateway docker tag from PR body
7+
# look in the PR body for the string ___REQUIRES_GATEWAY_PR___=9999, extract the number if so & save to env var
8+
# if gateway PR is labeled correctly, it will publish a docker tag called 'pr-9999' to use in tests
9+
if: ${{ contains(env.PR_BODY, '___REQUIRES_GATEWAY_PR___=') }}
10+
shell: bash
11+
run: |
12+
echo "GATEWAY_IMAGE_TAG=pr-$(echo $PR_BODY | sed -n 's/.*___REQUIRES_GATEWAY_PR___=\"\([0-9]\+\)\".*/\1/p')" >> $GITHUB_ENV
13+
- name: Load NPM Cache
14+
uses: ./.github/actions/load-node-cache
15+
# Start Hasura and Postgres ahead of assembling the Java code, as the Java code takes a few minutes to compile.
16+
# This means Hasura will have time to complete its start-up tasks without needing an extra "sleep 30" command.
17+
- name: Start Hasura and Postgres
18+
shell: bash
19+
run: |
20+
docker compose -f ./e2e-tests/docker-compose-test.yml up -d postgres hasura --quiet-pull
21+
- name: Assemble
22+
# Don't generate docs for tests
23+
shell: bash
24+
run: ./gradlew assemble -x javadoc -x javadocJar -x generateDocumentation --parallel
25+
- name: Start Remaining Services
26+
shell: bash
27+
run: |
28+
echo "GATEWAY_IMAGE_TAG: $GATEWAY_IMAGE_TAG"
29+
docker compose -f ./e2e-tests/docker-compose-test.yml up -d --build --quiet-pull
30+
docker images
31+
docker ps -a --no-trunc

.github/workflows/cloc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout Repo
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v6
2121
- name: Install cloc
2222
run: |
2323
sudo apt-get update

.github/workflows/create_jnispice.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
7z x JNISpice.zip
2121
echo "JNISpice unpacked"
2222
- name: Upload DLL
23-
uses: actions/upload-artifact@v4
23+
uses: actions/upload-artifact@v7
2424
with:
2525
name: Windows Spice
2626
path: JNISpice/lib/JNISpice.dll
@@ -39,7 +39,7 @@ jobs:
3939
run: mv libJNISpice.so libJNISpice_Intel.so
4040
working-directory: JNISpice/lib
4141
- name: Upload .so
42-
uses: actions/upload-artifact@v4
42+
uses: actions/upload-artifact@v7
4343
with:
4444
name: x86 Linux Spice
4545
path: JNISpice/lib/libJNISpice_Intel.so
@@ -64,7 +64,7 @@ jobs:
6464
working-directory: JNISpice/src/JNISpice
6565
shell: csh {0}
6666
- name: Upload Intel Mac .jnilib
67-
uses: actions/upload-artifact@v4
67+
uses: actions/upload-artifact@v7
6868
with:
6969
name: x86 Mac Spice
7070
path: JNISpice/lib/libJNISpice_Intel.jnilib
@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ubuntu-latest
7575
steps:
7676
- name: Setup Java
77-
uses: actions/setup-java@v4
77+
uses: actions/setup-java@v5
7878
with:
7979
distribution: "temurin"
8080
java-version: "21"
@@ -104,7 +104,7 @@ jobs:
104104
working-directory: JNISpice/src/JNISpice
105105
- name: Upload JAR
106106
if: success()
107-
uses: actions/upload-artifact@v4
107+
uses: actions/upload-artifact@v7
108108
with:
109109
name: JNISpice Jar
110110
path: JNISpice/src/JNISpice/JNISpice-*.jar

.github/workflows/deploy-to-gh-pages.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@ jobs:
1515
build:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v4
19-
- uses: actions/setup-java@v4
18+
- uses: actions/checkout@v6
19+
- uses: actions/setup-java@v5
2020
with:
2121
distribution: temurin
2222
java-version: "21"
23-
- uses: gradle/actions/setup-gradle@v3
23+
- uses: gradle/actions/setup-gradle@v5
24+
with:
25+
# This action defaults to matching on "main" and "master" as the branches allowed to write to the cache
26+
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
2427
- name: Create Pages Build Directories
2528
run: mkdir -p build/javadoc/examples
2629
- name: Build EDSL API Docs
@@ -54,7 +57,7 @@ jobs:
5457
cp -a ./scheduler-worker/build/docs/javadoc ./build/javadoc/scheduler-worker
5558
cp -a ./procedural/build/dokka/htmlMultiModule ./build/procedural-apis
5659
- name: Upload Artifact
57-
uses: actions/upload-pages-artifact@v3
60+
uses: actions/upload-pages-artifact@v4
5861
with:
5962
path: build/
6063

@@ -67,4 +70,4 @@ jobs:
6770
steps:
6871
- name: Deploy to GitHub Pages
6972
id: deployment
70-
uses: actions/deploy-pages@v4
73+
uses: actions/deploy-pages@v5

.github/workflows/load-test.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@ jobs:
2525
environment: load-test
2626
steps:
2727
- name: Checkout Repo
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v6
2929
- name: Setup Java
30-
uses: actions/setup-java@v4
30+
uses: actions/setup-java@v5
3131
with:
3232
distribution: "temurin"
3333
java-version: "21"
34-
- name: Validate Gradle Wrapper
35-
uses: gradle/wrapper-validation-action@v2
3634
- name: Setup Gradle
37-
uses: gradle/actions/setup-gradle@v3
35+
uses: gradle/actions/setup-gradle@v5
36+
with:
37+
# This action defaults to matching on "main" and "master" as the branches allowed to write to the cache
38+
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
3839
- name: Assemble
3940
run: ./gradlew assemble --parallel
4041
- name: Start Services
@@ -51,7 +52,7 @@ jobs:
5152
./load-test.sh
5253
- name: Upload Load Test Results
5354
if: always()
54-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@v7
5556
with:
5657
name: Load Test Results
5758
path: "**/load-tests/load-report.*"

.github/workflows/pgcmp.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ jobs:
4242
environment: e2e-test
4343
steps:
4444
- name: Checkout v2.8.0
45-
uses: actions/checkout@v4
45+
uses: actions/checkout@v6
4646
with:
4747
ref: "v2.8.0"
4848
- name: Clone PGCMP
49-
uses: actions/checkout@v4
49+
uses: actions/checkout@v6
5050
with:
5151
repository: NASA-AMMOS/pgcmp
5252
path: pgcmp
@@ -87,22 +87,23 @@ jobs:
8787
./pgcmp/pgcmp-dump
8888
shell: bash
8989
- name: Share Database Dump
90-
uses: actions/upload-artifact@v4
90+
uses: actions/upload-artifact@v7
9191
with:
9292
name: v2_8_0-db-dump
9393
path: pgdumpV2_8_0
9494
retention-days: 1
9595
- name: Checkout Latest
96-
uses: actions/checkout@v4
96+
uses: actions/checkout@v6
9797
- name: Setup Java
98-
uses: actions/setup-java@v4
98+
uses: actions/setup-java@v5
9999
with:
100100
distribution: "temurin"
101101
java-version: "21"
102-
- name: Validate Gradle Wrapper
103-
uses: gradle/wrapper-validation-action@v2
104102
- name: Setup Gradle
105-
uses: gradle/actions/setup-gradle@v3
103+
uses: gradle/actions/setup-gradle@v5
104+
with:
105+
# This action defaults to matching on "main" and "master" as the branches allowed to write to the cache
106+
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
106107
- name: Assemble Workspace Server
107108
run: ./gradlew workspace-server:assemble --parallel
108109
- name: Restart Hasura and Start Additional Containers
@@ -125,7 +126,7 @@ jobs:
125126
python aerie_db_migration.py migrate --apply --all
126127
cd ..
127128
- name: Clone PGCMP
128-
uses: actions/checkout@v4
129+
uses: actions/checkout@v6
129130
with:
130131
repository: NASA-AMMOS/pgcmp
131132
path: pgcmp
@@ -139,7 +140,7 @@ jobs:
139140
./pgcmp/pgcmp-dump
140141
shell: bash
141142
- name: Share Database Dump
142-
uses: actions/upload-artifact@v4
143+
uses: actions/upload-artifact@v7
143144
with:
144145
name: migrated-db-dump
145146
path: pgdumpmigrated
@@ -160,7 +161,7 @@ jobs:
160161
environment: e2e-test
161162
steps:
162163
- name: Checkout Repo
163-
uses: actions/checkout@v4
164+
uses: actions/checkout@v6
164165
- name: Setup Postgres Client (psql)
165166
# ubuntu-latest does not currently have psql-16 in its apt library, so we cannot just run
166167
# sudo apt update && sudo apt-get install --yes postgresql-client-16
@@ -174,7 +175,7 @@ jobs:
174175
sudo apt update
175176
sudo apt -y install postgresql-client-16
176177
- name: Setup Python
177-
uses: actions/setup-python@v5
178+
uses: actions/setup-python@v6
178179
with:
179180
python-version: "3.10"
180181
- name: Setup Hasura CLI
@@ -188,7 +189,7 @@ jobs:
188189
run: sleep 60s
189190
shell: bash
190191
- name: Clone PGCMP
191-
uses: actions/checkout@v4
192+
uses: actions/checkout@v6
192193
with:
193194
repository: NASA-AMMOS/pgcmp
194195
path: pgcmp
@@ -202,7 +203,7 @@ jobs:
202203
./pgcmp/pgcmp-dump
203204
shell: bash
204205
- name: Share Database Dump
205-
uses: actions/upload-artifact@v4
206+
uses: actions/upload-artifact@v7
206207
with:
207208
name: current-sql-db-dump
208209
path: pgdumpcurrent
@@ -227,7 +228,7 @@ jobs:
227228
./pgcmp/pgcmp-dump
228229
shell: bash
229230
- name: Share Database Dump
230-
uses: actions/upload-artifact@v4
231+
uses: actions/upload-artifact@v7
231232
with:
232233
name: migrated-down-db-dump
233234
path: pgdumpmigrateddown
@@ -247,9 +248,9 @@ jobs:
247248
runs-on: ubuntu-latest
248249
steps:
249250
- name: Checkout Repo
250-
uses: actions/checkout@v4
251+
uses: actions/checkout@v6
251252
- name: Clone PGCMP
252-
uses: actions/checkout@v4
253+
uses: actions/checkout@v6
253254
with:
254255
repository: NASA-AMMOS/pgcmp
255256
path: pgcmp
@@ -289,7 +290,7 @@ jobs:
289290
shell: bash
290291
- name: Upload Invalid
291292
if: ${{ failure() && steps.dbcmp.conclusion == 'failure' }}
292-
uses: actions/upload-artifact@v4
293+
uses: actions/upload-artifact@v7
293294
with:
294295
name: pgcmpresultsup
295296
path: "**/results/"
@@ -309,9 +310,9 @@ jobs:
309310
runs-on: ubuntu-latest
310311
steps:
311312
- name: Checkout Repo
312-
uses: actions/checkout@v4
313+
uses: actions/checkout@v6
313314
- name: Clone PGCMP
314-
uses: actions/checkout@v4
315+
uses: actions/checkout@v6
315316
with:
316317
repository: NASA-AMMOS/pgcmp
317318
path: pgcmp
@@ -351,7 +352,7 @@ jobs:
351352
shell: bash
352353
- name: Upload Invalid
353354
if: ${{ failure() && steps.dbcmp.conclusion == 'failure' }}
354-
uses: actions/upload-artifact@v4
355+
uses: actions/upload-artifact@v7
355356
with:
356357
name: pgcmpresultsdown
357358
path: "**/results/"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Profile Compilation
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
compile-check:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Repo
11+
uses: actions/checkout@v6
12+
- name: Load NPM Cache
13+
uses: ./.github/actions/load-node-cache
14+
- name: Setup Java
15+
uses: actions/setup-java@v5
16+
with:
17+
distribution: "temurin"
18+
java-version: "21"
19+
- name: Setup Gradle
20+
uses: gradle/actions/setup-gradle@v5
21+
with:
22+
# This action defaults to matching on "main" and "master" as the branches allowed to write to the cache
23+
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
24+
- name: Assemble
25+
# Don't generate docs for tests
26+
run: ./gradlew assemble -x javadoc -x javadocJar -x generateDocumentation --parallel --profile
27+
- name: Upload Profile
28+
if: always()
29+
uses: actions/upload-artifact@v7
30+
with:
31+
name: ProfileResults
32+
path: |
33+
/home/runner/work/plandev/plandev/build/reports/profile/profile*

0 commit comments

Comments
 (0)