Skip to content

Commit 07136b0

Browse files
committed
Tweak syntax in response to error.
1 parent 720879c commit 07136b0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: .github/workflows/test.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@ jobs:
2121
uses: actions/checkout@v3
2222

2323
- name: Set up environment
24-
if: matrix.os == 'ubuntu-latest'
24+
if: ${{ matrix.os == 'ubuntu-latest' }}
2525
shell: bash
2626
run: |
2727
echo "Running on Linux"
2828
- name: Set up environment
29-
if: matrix.os == 'macos-latest'
29+
if: ${{ matrix.os == 'macos-latest' }}
3030
shell: bash
3131
run: |
3232
echo "Running on macOS"
3333
- name: Set up environment
34-
if: matrix.os == 'windows-latest'
34+
if: ${{ matrix.os == 'windows-latest' }}
3535
shell: pwsh
3636
run: |
3737
echo "Running on Windows"
@@ -47,27 +47,28 @@ jobs:
4747

4848
- name: Simulate Failure Scenarios
4949
if: ${{ matrix.action == 'install' }}
50+
shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
5051
run: |
5152
# Fail download step intentionally
5253
echo "Testing download failure scenario"
5354
exit 1 # Simulate download failure
54-
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
5555
5656
- name: Simulate Report Command Failure
5757
if: ${{ matrix.action == 'report' }}
58+
shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
5859
run: |
5960
echo "Testing report command failure"
6061
~/bin/coveralls report # Simulated failure
61-
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
6262
6363
- name: Simulate Done Command Failure
6464
if: ${{ matrix.action == 'done' }}
65+
shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
6566
run: |
6667
echo "Testing done command failure"
6768
~/bin/coveralls done # Simulated failure
68-
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
6969
7070
- name: Verify Outcome
71+
shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
7172
run: |
7273
if [[ "${{ matrix.fail_on_error }}" == "true" ]]; then
7374
# Expect failure exit code
@@ -85,5 +86,4 @@ jobs:
8586
else
8687
echo "Test succeeded: expected success and action succeeded."
8788
fi
88-
shell: ${{ matrix.os == 'windows-latest' && 'pwsh' || 'bash' }}
89-
89+
fi

0 commit comments

Comments
 (0)