diff --git a/.github/actions/junit/action.yml b/.github/actions/junit/action.yml index baefa54..06eaf28 100644 --- a/.github/actions/junit/action.yml +++ b/.github/actions/junit/action.yml @@ -9,7 +9,7 @@ inputs: # test-reporter inputs reporter: description: The test reporter to use. - required: false + required: false # FIXME? true default: jest-junit tests_name: diff --git a/.github/actions/publish-test-deltas/action.yml b/.github/actions/publish-test-deltas/action.yml index 7a7025b..e8fc489 100644 --- a/.github/actions/publish-test-deltas/action.yml +++ b/.github/actions/publish-test-deltas/action.yml @@ -52,7 +52,7 @@ runs: using: composite steps: - name: publish-unit-test-result-action - uses: EnricoMi/publish-unit-test-result-action@v2.18.0 + uses: EnricoMi/publish-unit-test-result-action@v2.22.0 # TODO bump if: always() # if: (success() || failure()) && startsWith(${{ inputs.runs-on }}, 'ubuntu') # FIXME with: diff --git a/.github/actions/test-reporter/action.yml b/.github/actions/test-reporter/action.yml index 191aa61..e558bf1 100644 --- a/.github/actions/test-reporter/action.yml +++ b/.github/actions/test-reporter/action.yml @@ -60,7 +60,7 @@ runs: steps: # SRC: https://github.com/dorny/test-reporter?tab=readme-ov-file#usage - name: test-reporter - uses: dorny/test-reporter@v1.9.1 + uses: dorny/test-reporter@v2.5.0 # TODO bump if: always() with: # Name of the Check Run which will be created @@ -77,7 +77,7 @@ runs: # Comma-separated list of paths to test results # Supports wildcards via [fast-glob](https://github.com/mrmlnc/fast-glob) - # All matched result files must be of the same format. + # All matched result files must be of the same format path: ${{ inputs.files_pattern }} # Format of test results. Supported options: @@ -85,10 +85,14 @@ runs: # dotnet-nunit # dotnet-trx # flutter-json + # golang-json # java-junit # jest-junit # mocha-json + # phpunit-junit + # python-xunit # rspec-json + # swift-xunit reporter: ${{ inputs.reporter }} # Allows you to generate only the summary. diff --git a/.github/actions/test-summary/action.yml b/.github/actions/test-summary/action.yml index 4315c88..63c7f10 100644 --- a/.github/actions/test-summary/action.yml +++ b/.github/actions/test-summary/action.yml @@ -40,7 +40,7 @@ runs: using: composite steps: - name: pytest-results-action - uses: pmeier/pytest-results-action@v0.7.1 # FIXME + uses: pmeier/pytest-results-action@v0.7.2 # TODO bump if: always() with: # A list of JUnit XML files, directories containing the former, and wildcard diff --git a/.github/workflows/always.yml b/.github/workflows/always.yml index a242dbb..34e8504 100644 --- a/.github/workflows/always.yml +++ b/.github/workflows/always.yml @@ -1,8 +1,11 @@ name: "[C]ontinuous [I]ntegration" on: - push: workflow_dispatch: # Allows you to run this workflow manually from the Actions tab + pull_request: + push: + branches: + - main concurrency: group: ${{ github.ref }}-${{ github.workflow }} @@ -29,7 +32,6 @@ jobs: matrix: language: - actions - - javascript name: "CodeQL: ${{ matrix.language }}" uses: percebus/github-actions-compliance/.github/workflows/codeql_analyze.yml@main diff --git a/.github/workflows/test_actions__junit.yml b/.github/workflows/test_actions__junit.yml index d4473e9..9d06dc2 100644 --- a/.github/workflows/test_actions__junit.yml +++ b/.github/workflows/test_actions__junit.yml @@ -1,8 +1,11 @@ name: Test actions/junit on: - push: workflow_dispatch: # Allows you to run this workflow manually from the Actions tab + pull_request: + push: + branches: + - main concurrency: group: ${{ github.ref }}-${{ github.workflow }} @@ -118,3 +121,26 @@ jobs: summary_title: "" publish-test-deltas: ${{ matrix.publish-test-deltas }} comment_mode: off # XXX? + + files_pattern__matrix: + needs: default + runs-on: ubuntu-latest + strategy: + fail-fast: false + max-parallel: 10 + matrix: + include: + - files_pattern: assets/test-results/jest/junit.xml + reporter: jest-junit + + - files_pattern: assets/test-results/pytest/test-results.xml + reporter: python-xunit + + name: "files_pattern: ${{ matrix.files_pattern }}" + steps: + - uses: percebus/github-actions-common/.github/actions/checkout@main + - uses: ./.github/actions/junit + with: + files_pattern: ${{ matrix.files_pattern }} + reporter: ${{ matrix.reporter }} + comment_mode: off diff --git a/.github/workflows/test_actions__publish-test-deltas.yml b/.github/workflows/test_actions__publish-test-deltas.yml index d3be670..2e32e1b 100644 --- a/.github/workflows/test_actions__publish-test-deltas.yml +++ b/.github/workflows/test_actions__publish-test-deltas.yml @@ -1,8 +1,11 @@ name: Test actions/publish-test-deltas on: - push: workflow_dispatch: # Allows you to run this workflow manually from the Actions tab + pull_request: + push: + branches: + - main concurrency: group: ${{ github.ref }}-${{ github.workflow }} @@ -61,6 +64,7 @@ jobs: max-parallel: 10 matrix: files_pattern: + - assets/test-results/pytest/test-results.xml - assets/test-results/jest/junit.xml - assets/**/jest/junit.xml - "**/*junit.xml" @@ -70,8 +74,8 @@ jobs: - uses: ./.github/actions/publish-test-deltas with: files_pattern: ${{ matrix.files_pattern }} - comment_mode: off check_name: "actions/publish-test-deltas: files_pattern:${{ matrix.files_pattern }}" + comment_mode: off comment_mode__matrix: needs: default diff --git a/.github/workflows/test_actions__test-reporter.yml b/.github/workflows/test_actions__test-reporter.yml index 96e6096..141645a 100644 --- a/.github/workflows/test_actions__test-reporter.yml +++ b/.github/workflows/test_actions__test-reporter.yml @@ -1,8 +1,11 @@ name: Test actions/test-reporter on: - push: workflow_dispatch: # Allows you to run this workflow manually from the Actions tab + pull_request: + push: + branches: + - main concurrency: group: ${{ github.ref }}-${{ github.workflow }} @@ -50,6 +53,28 @@ jobs: reporter: ${{ env.REPORTER }} files_pattern: ${{ env.FILES_PATTERN }} + files_pattern__matrix: + needs: default + runs-on: ubuntu-latest + strategy: + fail-fast: false + max-parallel: 10 + matrix: + include: + - files_pattern: assets/test-results/jest/junit.xml + reporter: jest-junit + + - files_pattern: assets/test-results/pytest/test-results.xml + reporter: python-xunit + + name: "files_pattern: ${{ matrix.files_pattern }}" + steps: + - uses: percebus/github-actions-common/.github/actions/checkout@main + - uses: ./.github/actions/test-reporter + with: + files_pattern: ${{ matrix.files_pattern }} + reporter: ${{ matrix.reporter }} + list__matrix: needs: default strategy: diff --git a/.github/workflows/test_actions__test-summary.yml b/.github/workflows/test_actions__test-summary.yml index 73d2241..7a8d402 100644 --- a/.github/workflows/test_actions__test-summary.yml +++ b/.github/workflows/test_actions__test-summary.yml @@ -1,8 +1,11 @@ name: Test actions/test-summary on: - push: workflow_dispatch: # Allows you to run this workflow manually from the Actions tab + pull_request: + push: + branches: + - main concurrency: group: ${{ github.ref }}-${{ github.workflow }} @@ -40,3 +43,21 @@ jobs: with: title: actions/test-summary:Test Summary @ ${{ matrix.OS }} files_pattern: ${{ env.FILES_PATTERN }} + + files_pattern__matrix: + needs: default + runs-on: ubuntu-latest + strategy: + fail-fast: false + max-parallel: 10 + matrix: + files_pattern: + - assets/test-results/jest/junit.xml + - assets/test-results/pytest/test-results.xml + + name: "files_pattern: ${{ matrix.files_pattern }}" + steps: + - uses: percebus/github-actions-common/.github/actions/checkout@main + - uses: ./.github/actions/test-summary + with: + files_pattern: ${{ matrix.files_pattern }} diff --git a/assets/test-results/pytest/test-results.xml b/assets/test-results/pytest/test-results.xml new file mode 100644 index 0000000..de97d40 --- /dev/null +++ b/assets/test-results/pytest/test-results.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/package.json b/package.json index 55c6411..fe4d5ff 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,12 @@ "prettier:check": "npm run _prettier -- --check", "prettier:write": "npm run _prettier -- --write", "lint": "npm run prettier:check", - "style": "npm run prettier:write", - "poststyle": "npm run lint", + "format": "npm run prettier:write", + "style": "npm run format", + "postformat": "npm run lint", "pretest": "npm run lint", "test": "exit 0", - "predev": "npm run style", + "predev": "npm run format", "dev": "npm run test" }, "repository": {