Add artifact event pull for EnricoMi/publish-unit-test-result-action #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: {} | |
permissions: | |
checks: write | |
pull-requests: write | |
env: | |
JAVA_VERSION: "17" | |
JAVA_DISTRIBUTION: "temurin" | |
jobs: | |
test: | |
name: "Test and Collect Results" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "${{ env.JAVA_DISTRIBUTION }}" | |
java-version: "${{ env.JAVA_VERSION }}" | |
- name: Run unit tests | |
run: | | |
make -C src unit-test | |
id: unit-tests | |
- name: Run integration tests | |
run: | | |
make -C src smoke-test | |
id: integration-tests | |
- name: Run specification tests | |
run: | | |
make -C src spec-test | |
id: spec-tests | |
# Publish the test summary as comment on the PR | |
- name: Publish XSpec Test Results Summary | |
uses: EnricoMi/publish-unit-test-result-action@8885e273a4343cd7b48eaa72428dea0c3067ea98 | |
if: runner.os == 'Linux' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
check_name: XSpec Test Results | |
files: "**/*_junit-report.xml" | |
report_individual_runs: true | |
deduplicate_classes_by_file_name: false | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 | |
with: | |
name: Test Results | |
path: | | |
**/*_junit-report.xml | |
event_file: | |
name: "Upload Results to Event File" | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Upload | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 | |
with: | |
name: test_results | |
path: ${{ github.event_path }} |