@@ -20,17 +20,17 @@ jobs:
20
20
- name : Checkout code
21
21
uses : actions/checkout@v3
22
22
23
- - name : Set up environment
23
+ - name : Set up environment (Linux)
24
24
if : ${{ matrix.os == 'ubuntu-latest' }}
25
25
shell : bash
26
26
run : |
27
27
echo "Running on Linux"
28
- - name : Set up environment
28
+ - name : Set up environment (MacOS)
29
29
if : ${{ matrix.os == 'macos-latest' }}
30
30
shell : bash
31
31
run : |
32
32
echo "Running on macOS"
33
- - name : Set up environment
33
+ - name : Set up environment (Windows)
34
34
if : ${{ matrix.os == 'windows-latest' }}
35
35
shell : pwsh
36
36
run : |
@@ -45,45 +45,45 @@ jobs:
45
45
env :
46
46
CI : true
47
47
48
- # - name: Simulate Failure Scenarios
49
- # if: ${{ matrix.action == 'install' }}
50
- # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
51
- # run: |
52
- # # Fail download step intentionally
53
- # echo "Testing download failure scenario"
54
- # exit 1 # Simulate download failure
48
+ - name : Simulate Failure Scenarios
49
+ if : ${{ matrix.action == 'install' }}
50
+ shell : ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
51
+ run : |
52
+ # Fail download step intentionally
53
+ echo "Testing download failure scenario"
54
+ exit 1 # Simulate download failure
55
55
56
- # - name: Simulate Report Command Failure
57
- # if: ${{ matrix.action == 'report' }}
58
- # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
59
- # run: |
60
- # echo "Testing report command failure"
61
- # ~/bin/coveralls report # Simulated failure
56
+ - name : Simulate Report Command Failure
57
+ if : ${{ matrix.action == 'report' }}
58
+ shell : ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
59
+ run : |
60
+ echo "Testing report command failure"
61
+ ~/bin/coveralls report # Simulated failure
62
62
63
- # - name: Simulate Done Command Failure
64
- # if: ${{ matrix.action == 'done' }}
65
- # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
66
- # run: |
67
- # echo "Testing done command failure"
68
- # ~/bin/coveralls done # Simulated failure
63
+ - name : Simulate Done Command Failure
64
+ if : ${{ matrix.action == 'done' }}
65
+ shell : ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
66
+ run : |
67
+ echo "Testing done command failure"
68
+ ~/bin/coveralls done # Simulated failure
69
69
70
- # - name: Verify Outcome
71
- # shell: ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
72
- # run: |
73
- # if [[ "${{ matrix.fail_on_error }}" == "true" ]]; then
74
- # # Expect failure exit code
75
- # if [[ $? -eq 0 ]]; then
76
- # echo "Test failed: expected failure but action succeeded."
77
- # exit 1
78
- # else
79
- # echo "Test succeeded: expected failure and action failed as expected."
80
- # fi
81
- # else
82
- # # Expect success exit code
83
- # if [[ $? -ne 0 ]]; then
84
- # echo "Test failed: expected success but action failed."
85
- # exit 1
86
- # else
87
- # echo "Test succeeded: expected success and action succeeded."
88
- # fi
89
- # fi
70
+ - name : Verify Outcome
71
+ shell : ${{ startsWith(matrix.os, 'windows-latest') && 'pwsh' || 'bash' }}
72
+ run : |
73
+ if [[ "${{ matrix.fail_on_error }}" == "true" ]]; then
74
+ # Expect failure exit code
75
+ if [[ $? -eq 0 ]]; then
76
+ echo "Test failed: expected failure but action succeeded."
77
+ exit 1
78
+ else
79
+ echo "Test succeeded: expected failure and action failed as expected."
80
+ fi
81
+ else
82
+ # Expect success exit code
83
+ if [[ $? -ne 0 ]]; then
84
+ echo "Test failed: expected success but action failed."
85
+ exit 1
86
+ else
87
+ echo "Test succeeded: expected success and action succeeded."
88
+ fi
89
+ fi
0 commit comments