Skip to content

Update codecov/codecov-action action to v4 - autoclosed #69

Update codecov/codecov-action action to v4 - autoclosed

Update codecov/codecov-action action to v4 - autoclosed #69

Workflow file for this run

name: macOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
macos-test-build-release-xcode:
runs-on: macOS-latest
strategy:
matrix:
xcode: ["13.4.1", "14.2"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Test
run: swift test -v --skip-update --parallel --enable-test-discovery --enable-code-coverage
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload test artifacts
if: failure()
uses: actions/[email protected]
with:
name: test-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
.build/**/*.json
.build/**/*.xctest
- name: Generate coverage report
run: xcrun llvm-cov export -format="lcov" .build/debug/*PackageTests.xctest/Contents/MacOS/*PackageTests -instr-profile .build/debug/codecov/default.profdata > coverage.lcov
- name: Upload code coverage report
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage.lcov
fail_ci_if_error: true
- name: Build Release
run: swift build -c release
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
- name: Upload build artifacts
if: failure()
uses: actions/[email protected]
with:
name: build-artifacts-${{ matrix.xcode }}-${{ github.run_id }}
path: |
*.lcov
.build/*.yaml
.build/**/*.a
.build/**/*.so
.build/**/*.dylib
.build/**/*.dSYM
.build/**/*.json