Skip to content

Commit

Permalink
Merge pull request hyperledger#26 from jflo/gha_acceptTest
Browse files Browse the repository at this point in the history
Gha accept test
  • Loading branch information
jflo committed Dec 12, 2023
2 parents 1a77459 + 01e4ed8 commit 9dce9e0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ jobs:
uses: dawidd6/action-download-artifact@v2
with:
branch: main
name: acceptance-test-results
name_is_regexp: true
name: 'acceptance-node-\d*\d-test-results'
path: tmp/junit-xml-reports-downloaded
if_no_artifact_found: true
- name: setup gradle
Expand All @@ -54,7 +55,7 @@ jobs:
- name: Upload Acceptance Test Results
uses: actions/upload-artifact@v3.1.0
with:
name: acceptance-test-results
name: acceptance-node-${{matrix.runner_index}}-test-results
path: 'acceptance-tests/tests/build/test-results/acceptanceTest/TEST-*.xml'
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/pre-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ jobs:
uses: gradle/gradle-build-action@v2.10.0
- name: run unit tests
run: ./gradlew $GRADLEW_UNIT_TEST_ARGS -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
- name: Upload Test Report
uses: actions/upload-artifact@v3
if: always() # always run even if the previous step fails
with:
name: junit-xml-reports
path: '**/build/test-results/test/TEST-*.xml'
retention-days: 1
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the build step fails
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/reference-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ jobs:
- name: store generated tests
uses: actions/upload-artifact@v3
with:
name: reference-tests
name: 'reference-tests'
path: 'ethereum/referencetests/build/generated/sources/reference-test/**/*.java'

referenceTestEthereum:
runs-on: ubuntu-22.04
needs:
- prepareReferenceTestEthereum
#TODO: add condition to check pr is approved
if: ${{ github.actor != 'dependabot[bot]' }}
strategy:
fail-fast: false
Expand All @@ -50,19 +51,21 @@ jobs:
with:
distribution: adopt
java-version: 17
- name: get acceptance test report
- name: retrieve generated tests
uses: actions/download-artifact@v3.0.2
with:
name: 'reference-tests'
path: 'ethereum/referencetests/build/generated/sources/reference-test/'
- name: get reference test report
uses: dawidd6/action-download-artifact@v2
with:
branch: main
name: acceptance-test-results
name_is_regexp: true
name: 'reference-test-node-\d*\d-results'
path: tmp/ref-xml-reports-downloaded
if_no_artifact_found: true
- name: setup gradle
uses: gradle/gradle-build-action@v2
- name: retrieve generated tests
uses: dawidd6/action-download-artifact@v2
with:
name: reference-tests
- name: Split tests
id: split-tests
uses: r7kamura/split-tests-by-timings@v0
Expand All @@ -75,14 +78,10 @@ jobs:
run: echo ${{ steps.split-tests.outputs.paths }} | sed -e 's/^.*java\///' -e 's@/@.@g' -e 's/\.java//' -e 's/^/--tests /' > refTestArgs.txt
- name: run reference tests
run: ./gradlew ethereum:referenceTests:referenceTests `cat refTestArgs.txt` -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
- name: Correct Ownership in GITHUB_WORKSPACE directory
uses: peter-murray/reset-workspace-ownership-action@v1
with:
user_id: ${{ env.runner_uid }}
- name: Upload Test Report
uses: actions/upload-artifact@v3
if: always() # always run even if the previous step fails
with:
name: acceptance-test-results
name: reference-test-node-${{matrix.runner-index}}-results
path: '**/build/test-results/referenceTests/TEST-*.xml'

0 comments on commit 9dce9e0

Please sign in to comment.