99
1010env :
1111 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
12- CODECOV_XCODE_VERSION : " 15.4 " # Xcode version used to generate code coverage
12+ CODECOV_XCODE_VERSION : " 16.0 " # Xcode version used to generate code coverage
1313
1414jobs :
15- macos-test-build-release-xcode :
16- runs-on : macOS-latest
15+ macos :
16+ runs-on : ${{ matrix.config.os }}
1717 strategy :
18+ fail-fast : true
1819 matrix :
19- xcode : ["14.3.1", "15.4", "16.0"]
20-
20+ config :
21+ - { os: "macos-14", xcode: "15.4" }
22+ - { os: "macos-15", xcode: "16.0" }
2123 steps :
2224 - name : Checkout
2325 uses : actions/checkout@v4
2426
25- - name : Select Xcode ${{ matrix.xcode }}
26- run : sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
27+ - name : Select Xcode ${{ matrix.config. xcode }}
28+ run : sudo xcode-select -s /Applications/Xcode_${{ matrix.config. xcode }}.app
2729
2830 - name : Test
2931 run : swift test -c release --parallel --xunit-output .build/xUnit-output.xml --enable-code-coverage
3032 env :
31- DEVELOPER_DIR : /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
33+ DEVELOPER_DIR : /Applications/Xcode_${{ matrix.config. xcode }}.app/Contents/Developer
3234
3335 - name : Upload test artifacts
3436 if : failure()
3537 uses : actions/upload-artifact@v4.4.3
3638 with :
37- name : test-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
39+ name : test-artifacts-${{ matrix.config. xcode }}-${{ github.run_id }}
3840 path : |
3941 .build/*.yaml
4042 .build/*.xml
@@ -48,13 +50,13 @@ jobs:
4850
4951 # Only run coverage steps if the CODECOV_TOKEN is available and the matrix.xcode matches CODECOV_XCODE_VERSION
5052 - name : Generate coverage report
51- if : env.CODECOV_TOKEN != '' && matrix.xcode == env.CODECOV_XCODE_VERSION
53+ if : env.CODECOV_TOKEN != '' && matrix.config. xcode == env.CODECOV_XCODE_VERSION
5254 run : xcrun llvm-cov export -format="lcov" .build/**/*PackageTests.xctest/Contents/MacOS/*PackageTests -instr-profile .build/**/codecov/default.profdata > coverage.lcov
5355
5456 - name : Upload code coverage report
55- if : env.CODECOV_TOKEN != '' && matrix.xcode == env.CODECOV_XCODE_VERSION
56- uses : codecov/codecov-action@v4.6.0
57+ if : env.CODECOV_TOKEN != '' && matrix.config. xcode == env.CODECOV_XCODE_VERSION
58+ uses : codecov/codecov-action@v5.0.2
5759 with :
5860 token : ${{ env.CODECOV_TOKEN }}
59- file : coverage.lcov
61+ files : coverage.lcov
6062 fail_ci_if_error : true
0 commit comments