summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMarkus Pettersson <markus.pettersson@mullvad.net>2023-10-24 10:04:52 +0200
committerMarkus Pettersson <markus.pettersson@mullvad.net>2023-10-24 10:04:52 +0200
commita01462d02ba9669b5ed3e7a4a8bc7921e5f86348 (patch)
tree9d27601029694c1833fbe69dfe488203fac87cf9
parentf6a6bfabfa84b2f7b52cece1fe689800b0e050a7 (diff)
downloadmullvadvpn-a01462d02ba9669b5ed3e7a4a8bc7921e5f86348.tar.xz
mullvadvpn-a01462d02ba9669b5ed3e7a4a8bc7921e5f86348.zip
Upload e2e-test report matrix
Upload e2e-test report matrix as an `.html` file and submit it to github actions job summary: https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/
-rw-r--r--.github/workflows/desktop-e2e.yml41
-rw-r--r--test/test-manager/src/summary.rs3
2 files changed, 41 insertions, 3 deletions
diff --git a/.github/workflows/desktop-e2e.yml b/.github/workflows/desktop-e2e.yml
index 86cf45345e..3a2512e1c5 100644
--- a/.github/workflows/desktop-e2e.yml
+++ b/.github/workflows/desktop-e2e.yml
@@ -21,6 +21,11 @@ jobs:
shell: bash -ieo pipefail {0}
run: |
./test/ci-runtests.sh ${{ matrix.os }}
+ - uses: actions/upload-artifact@v3
+ if: '!cancelled()'
+ with:
+ name: ${{ matrix.os }}_report
+ path: ./test/.ci-logs/${{ matrix.os }}_report
e2e-test-windows:
name: Windows end-to-end tests
runs-on: [self-hosted, desktop-test, Linux] # app-test-linux
@@ -38,6 +43,11 @@ jobs:
shell: bash -ieo pipefail {0}
run: |
./test/ci-runtests.sh ${{ matrix.os }}
+ - uses: actions/upload-artifact@v3
+ if: '!cancelled()'
+ with:
+ name: ${{ matrix.os }}_report
+ path: ./test/.ci-logs/${{ matrix.os }}_report
e2e-test-macos:
name: macOS end-to-end tests
runs-on: [self-hosted, desktop-test, macOS] # app-test-macos-arm
@@ -55,3 +65,34 @@ jobs:
shell: bash -ieo pipefail {0}
run: |
./test/ci-runtests.sh ${{ matrix.os }}
+ - uses: actions/upload-artifact@v3
+ if: '!cancelled()'
+ with:
+ name: ${{ matrix.os }}_report
+ path: ./test/.ci-logs/${{ matrix.os }}_report
+ compile-test-matrix:
+ name: Result matrix
+ needs: [e2e-test-linux, e2e-test-windows, e2e-test-macos]
+ if: '!cancelled()'
+ runs-on: [self-hosted, desktop-test, Linux]
+ timeout-minutes: 240
+ strategy:
+ fail-fast: false
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ - uses: actions/download-artifact@v3
+ with:
+ path: ./test/.ci-logs/artifacts
+ - name: Generate test result matrix
+ shell: bash -ieo pipefail {0}
+ run: |
+ cd test
+ # "Unpack" the downloaded report artifacts: https://github.com/actions/download-artifact/issues/141
+ cp ./.ci-logs/artifacts/*_report/*_report ./.ci-logs/
+ cargo run --bin test-manager format-test-reports ./.ci-logs/*_report \
+ | tee summary.html >> $GITHUB_STEP_SUMMARY
+ - uses: actions/upload-artifact@v3
+ with:
+ name: summary.html
+ path: test/summary.html
diff --git a/test/test-manager/src/summary.rs b/test/test-manager/src/summary.rs
index cad11aca83..b8a6d5d809 100644
--- a/test/test-manager/src/summary.rs
+++ b/test/test-manager/src/summary.rs
@@ -177,9 +177,6 @@ pub async fn print_summary_table<P: AsRef<Path>>(summary_files: &[P]) {
// Collect test details
let tests: Vec<_> = inventory::iter::<crate::tests::TestMetadata>().collect();
- // Add some styling to the summary.
- println!("<head> <style> table, th, td {{ border: 1px solid black; }} </style> </head>");
-
// Print a table
println!("<table>");