From ca3117264a99ba634f7a8d70cd3bb6dc91df6664 Mon Sep 17 00:00:00 2001 From: marracuene Date: Sat, 20 Jun 2020 10:06:52 +0200 Subject: [PATCH 1/7] If build fails, upload test reports as an artifact, so that they can be investigated. See https://github.com/gradle/playframework/issues/136 Signed-off-by: marracuene --- .github/workflows/gradle-build-pr.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/gradle-build-pr.yml b/.github/workflows/gradle-build-pr.yml index 4576e6b3..1356d06a 100644 --- a/.github/workflows/gradle-build-pr.yml +++ b/.github/workflows/gradle-build-pr.yml @@ -15,3 +15,8 @@ jobs: - uses: eskatos/gradle-command-action@v1 with: arguments: ${{ matrix.task }} + - uses: actions/upload-artifact@v2 + if: failure() + with: + name: testreports + path: build/reports/tests # or path/to/artifact \ No newline at end of file From 74209915be868dd1e57424c7fca480cce970f40b Mon Sep 17 00:00:00 2001 From: marracuene Date: Tue, 23 Jun 2020 11:03:08 +0200 Subject: [PATCH 2/7] Added comments Signed-off-by: marracuene --- .github/workflows/gradle-build-pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle-build-pr.yml b/.github/workflows/gradle-build-pr.yml index 1356d06a..835a2140 100644 --- a/.github/workflows/gradle-build-pr.yml +++ b/.github/workflows/gradle-build-pr.yml @@ -12,11 +12,13 @@ jobs: - uses: actions/setup-java@v1 with: java-version: 8 + #run the build - uses: eskatos/gradle-command-action@v1 with: arguments: ${{ matrix.task }} + #upload build reports for later inspection - uses: actions/upload-artifact@v2 if: failure() with: name: testreports - path: build/reports/tests # or path/to/artifact \ No newline at end of file + path: build/reports/tests \ No newline at end of file From 7ac179f89b2373735e4737a9638d9089e901073d Mon Sep 17 00:00:00 2001 From: marracuene Date: Tue, 23 Jun 2020 11:07:09 +0200 Subject: [PATCH 3/7] Alter syntax Signed-off-by: marracuene --- .github/workflows/gradle-build-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle-build-pr.yml b/.github/workflows/gradle-build-pr.yml index 835a2140..80c71ba9 100644 --- a/.github/workflows/gradle-build-pr.yml +++ b/.github/workflows/gradle-build-pr.yml @@ -18,7 +18,7 @@ jobs: arguments: ${{ matrix.task }} #upload build reports for later inspection - uses: actions/upload-artifact@v2 - if: failure() + # if: failure() with: name: testreports path: build/reports/tests \ No newline at end of file From 26a9e78d19448564628b5b3faa98a860908166c6 Mon Sep 17 00:00:00 2001 From: marracuene Date: Tue, 23 Jun 2020 11:10:34 +0200 Subject: [PATCH 4/7] Alter syntax Signed-off-by: marracuene --- .github/workflows/gradle-build-pr.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle-build-pr.yml b/.github/workflows/gradle-build-pr.yml index 80c71ba9..e3456f48 100644 --- a/.github/workflows/gradle-build-pr.yml +++ b/.github/workflows/gradle-build-pr.yml @@ -12,13 +12,12 @@ jobs: - uses: actions/setup-java@v1 with: java-version: 8 - #run the build + # run the build - uses: eskatos/gradle-command-action@v1 with: arguments: ${{ matrix.task }} - #upload build reports for later inspection + # upload build reports for later inspection - uses: actions/upload-artifact@v2 - # if: failure() with: name: testreports path: build/reports/tests \ No newline at end of file From 4b5a41931e691c6157d4d20f393f25fb00a93076 Mon Sep 17 00:00:00 2001 From: marracuene Date: Tue, 23 Jun 2020 11:15:40 +0200 Subject: [PATCH 5/7] Alter syntax Signed-off-by: marracuene --- .github/workflows/gradle-build-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/gradle-build-pr.yml b/.github/workflows/gradle-build-pr.yml index e3456f48..6302252e 100644 --- a/.github/workflows/gradle-build-pr.yml +++ b/.github/workflows/gradle-build-pr.yml @@ -18,6 +18,6 @@ jobs: arguments: ${{ matrix.task }} # upload build reports for later inspection - uses: actions/upload-artifact@v2 - with: + with: name: testreports path: build/reports/tests \ No newline at end of file From f77303041a902520363500109ce38bf3df035dbc Mon Sep 17 00:00:00 2001 From: marracuene Date: Tue, 23 Jun 2020 12:06:46 +0200 Subject: [PATCH 6/7] Restrict to only integrationTests Signed-off-by: marracuene --- .github/workflows/gradle-build-pr.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gradle-build-pr.yml b/.github/workflows/gradle-build-pr.yml index 6302252e..407228d5 100644 --- a/.github/workflows/gradle-build-pr.yml +++ b/.github/workflows/gradle-build-pr.yml @@ -5,7 +5,8 @@ jobs: gradle: strategy: matrix: - task: [integrationTest, docTest] + # task: [integrationTest, docTest] + task: [integrationTest] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -18,6 +19,7 @@ jobs: arguments: ${{ matrix.task }} # upload build reports for later inspection - uses: actions/upload-artifact@v2 + if: failure() with: name: testreports path: build/reports/tests \ No newline at end of file From 67b8f602d893c1ae2b31dfe8127461a241514776 Mon Sep 17 00:00:00 2001 From: marracuene Date: Tue, 23 Jun 2020 12:43:34 +0200 Subject: [PATCH 7/7] Restrict to only integrationTests Signed-off-by: marracuene --- .github/workflows/gradle-build-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gradle-build-pr.yml b/.github/workflows/gradle-build-pr.yml index 407228d5..b5f253a3 100644 --- a/.github/workflows/gradle-build-pr.yml +++ b/.github/workflows/gradle-build-pr.yml @@ -5,8 +5,7 @@ jobs: gradle: strategy: matrix: - # task: [integrationTest, docTest] - task: [integrationTest] + task: [docTest, integrationTest] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -17,7 +16,8 @@ jobs: - uses: eskatos/gradle-command-action@v1 with: arguments: ${{ matrix.task }} - # upload build reports for later inspection + # upload build reports for later inspection, if the build failed + # N.B only applies to the last task in the matrix - uses: actions/upload-artifact@v2 if: failure() with: