Skip to content

Commit 7db2827

Browse files
WIP pre-compile test framework to use in Github actions
1 parent 0d3c317 commit 7db2827

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

.github/workflows/desktop-e2e.yml

+29-4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
echo "inner_container_image=$(cat ./building/linux-container-image.txt)" >> $GITHUB_ENV
9393
outputs:
9494
container_image: ${{ env.inner_container_image }}
95+
9596
build-linux:
9697
name: Build Linux
9798
needs: prepare-linux
@@ -126,6 +127,29 @@ jobs:
126127
./dist/*.deb
127128
./dist/app-e2e-*
128129
130+
test-framework-linux:
131+
name: Pre-compile test framework
132+
needs: prepare-linux
133+
runs-on: ubuntu-latest
134+
container:
135+
image: ${{ needs.prepare-linux.outputs.container_image }}
136+
continue-on-error: true
137+
steps:
138+
# Fix for HOME path overridden by GH runners when building in containers, see:
139+
# https://github.com/actions/runner/issues/863
140+
- name: Fix HOME path
141+
run: echo "HOME=/root" >> $GITHUB_ENV
142+
- name: Checkout repository
143+
uses: actions/checkout@v4
144+
- name: Build test framework
145+
working-directory: test
146+
run: ./scripts/container-run.sh ./scripts/build.sh
147+
- uses: actions/upload-artifact@v3
148+
with:
149+
name: test-framework-linux
150+
path: |
151+
./test/dist/*
152+
129153
e2e-test-linux:
130154
name: Linux end-to-end tests
131155
needs: [prepare-matrices, build-linux]
@@ -306,25 +330,26 @@ jobs:
306330

307331
compile-test-matrix:
308332
name: Result matrix
309-
needs: [e2e-test-linux, e2e-test-windows, e2e-test-macos]
333+
needs: [e2e-test-linux, e2e-test-windows, e2e-test-macos, test-framework-linux]
310334
if: '!cancelled()'
311335
runs-on: [self-hosted, desktop-test, Linux]
312336
timeout-minutes: 240
313337
strategy:
314338
fail-fast: false
315339
steps:
316-
- name: Checkout repository
317-
uses: actions/checkout@v4
318340
- uses: actions/download-artifact@v3
319341
with:
320342
path: ./test/.ci-logs/artifacts
343+
- uses: actions/download-artifact@v3
344+
with:
345+
name: test-framework-linux
321346
- name: Generate test result matrix
322347
shell: bash -ieo pipefail {0}
323348
run: |
324349
cd test
325350
# "Unpack" the downloaded report artifacts: https://github.com/actions/download-artifact/issues/141
326351
cp ./.ci-logs/artifacts/*_report/*_report ./.ci-logs/
327-
cargo run --bin test-manager format-test-reports ./.ci-logs/*_report \
352+
${{ inputs.workspace }}/test-manager format-test-reports ./.ci-logs/*_report \
328353
| tee summary.html >> $GITHUB_STEP_SUMMARY
329354
- uses: actions/upload-artifact@v3
330355
with:

0 commit comments

Comments
 (0)