From bdfa7f305ce77e2e22e19e4e06e1852085d53567 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 7 May 2020 23:17:51 +0200 Subject: [PATCH] CI: Publish HTML report of tests as an artifact This also lets ant print a message pointing to this artifact and explaining the files inside briefly. To make sure this is only printed inside the github action, an extra `-D` option is passed to `ant test` from the workflow file. To allow `if` / `unless` on the echo element, this adds some namespace definitions (this allows them on *any* element, not just the ones that explicitly allow it). See https://ant.apache.org/manual/ifunless.html --- .github/workflows/ant.yml | 7 ++++++- app/build.xml | 12 ++++++++---- build/build.xml | 1 + 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index 11b9bd1a5..0a2e0a343 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -24,6 +24,11 @@ jobs: run: sudo apt-get install -y xvfb - name: Run tests working-directory: ./app - run: xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" ant test + run: xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" ant test -Drunning-from-github-action=1 + - name: Publish results + uses: actions/upload-artifact@v1 + with: + name: html-results + path: app/test-bin/results/html/ - name: Cleanup xvfb uses: bcomnes/cleanup-xvfb@v1 diff --git a/app/build.xml b/app/build.xml index 8b723f660..fa3223642 100644 --- a/app/build.xml +++ b/app/build.xml @@ -1,5 +1,5 @@ - + @@ -160,14 +160,18 @@ - + + + + - - + + + diff --git a/build/build.xml b/build/build.xml index 838ebc811..f96b1723c 100644 --- a/build/build.xml +++ b/build/build.xml @@ -188,6 +188,7 @@ +