|
14 | 14 | strategy:
|
15 | 15 | matrix:
|
16 | 16 | os: [ubuntu-latest, windows-latest, macos-latest]
|
17 |
| - action: [install, report, done] |
| 17 | + action: [report, done] # Note: We're also testing 'install' since it's implicitly in each of these two actions |
18 | 18 | fail_on_error: [true, false]
|
19 | 19 | steps:
|
20 | 20 | - name: Checkout code
|
|
42 | 42 | github-token: ${{ secrets.GITHUB_TOKEN }}
|
43 | 43 | fail-on-error: ${{ matrix.fail_on_error }}
|
44 | 44 | debug: true
|
| 45 | + parallel-finished: ${{ matrix.action == 'done' }} # Only set 'parallel-finished' to true when testing 'done' |
45 | 46 | env:
|
46 | 47 | CI: true
|
47 | 48 | continue-on-error: ${{ matrix.fail_on_error }}
|
48 |
| - |
49 |
| - # - name: Simulate Failure Scenarios |
50 |
| - # if: ${{ matrix.action == 'install' }} |
51 |
| - # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }} |
52 |
| - # run: | |
53 |
| - # # Fail download step intentionally |
54 |
| - # echo "Testing download failure scenario" |
55 |
| - # exit 1 # Simulate download failure |
56 |
| - |
57 |
| - # - name: Simulate Report Command Failure |
58 |
| - # if: ${{ matrix.action == 'report' }} |
59 |
| - # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }} |
60 |
| - # run: | |
61 |
| - # echo "Testing report command failure" |
62 |
| - # ~/bin/coveralls report # Simulated failure |
63 |
| - |
64 |
| - # - name: Simulate Done Command Failure |
65 |
| - # if: ${{ matrix.action == 'done' }} |
66 |
| - # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }} |
67 |
| - # run: | |
68 |
| - # echo "Testing done command failure" |
69 |
| - # ~/bin/coveralls done # Simulated failure |
70 |
| - |
71 |
| - # - name: Verify Outcome |
72 |
| - # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }} |
73 |
| - # run: | |
74 |
| - # if [[ "${{ matrix.fail_on_error }}" == "true" ]]; then |
75 |
| - # # Expect failure exit code |
76 |
| - # if [[ $? -eq 0 ]]; then |
77 |
| - # echo "Test failed: expected failure but action succeeded." |
78 |
| - # exit 1 |
79 |
| - # else |
80 |
| - # echo "Test succeeded: expected failure and action failed as expected." |
81 |
| - # fi |
82 |
| - # else |
83 |
| - # # Expect success exit code |
84 |
| - # if [[ $? -ne 0 ]]; then |
85 |
| - # echo "Test failed: expected success but action failed." |
86 |
| - # exit 1 |
87 |
| - # else |
88 |
| - # echo "Test succeeded: expected success and action succeeded." |
89 |
| - # fi |
90 |
| - # fi |
0 commit comments