Change version to 1.2.0 #45
This file contains hidden or 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: Run Tests | |
| on: | |
| push: | |
| branches: | |
| - "**" | |
| tags-ignore: | |
| - "**" | |
| # Can't run on pull_request because the token won't have actions:write permission | |
| workflow_dispatch: | |
| permissions: | |
| actions: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - name: Normal case | |
| expected_to_fail: false | |
| ref: ${{ github.ref_name }} | |
| inputs: | | |
| { | |
| "sleep": "10", | |
| "fail": "false" | |
| } | |
| run_timeout_seconds: 300 | |
| - name: ref instead of ref_name | |
| expected_to_fail: false | |
| ref: ${{ github.ref }} | |
| inputs: | | |
| { | |
| "sleep": "10", | |
| "fail": "false" | |
| } | |
| run_timeout_seconds: 300 | |
| - name: Failed workflow | |
| expected_to_fail: true | |
| ref: ${{ github.ref_name }} | |
| inputs: | | |
| { | |
| "sleep": "10", | |
| "fail": "true" | |
| } | |
| run_timeout_seconds: 300 | |
| - name: Run succeeds but takes too long | |
| expected_to_fail: true | |
| ref: ${{ github.ref_name }} | |
| inputs: | | |
| { | |
| "sleep": "20", | |
| "fail": "false" | |
| } | |
| run_timeout_seconds: 10 | |
| name: ${{ matrix.name }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Dispatch dummy workflow | |
| id: dispatch_dummy_workflow | |
| continue-on-error: ${{ matrix.expected_to_fail }} | |
| uses: ./ | |
| with: | |
| token: ${{ github.token }} | |
| owner: ${{ github.repository_owner }} | |
| repo: ${{ github.event.repository.name }} | |
| ref: ${{ matrix.ref }} | |
| workflow: dummy.yml | |
| workflow_inputs: ${{ matrix.inputs }} | |
| run_timeout_seconds: ${{ matrix.run_timeout_seconds }} | |
| - name: Assert dummy workflow failed | |
| if: ${{ matrix.expected_to_fail && steps.dispatch_dummy_workflow.outcome != 'failure' }} | |
| run: exit 1 |