chore(deps): bump github/codeql-action from 3.26.6 to 3.26.7 (#177) #459
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Swift | |
on: | |
push: | |
branches: [ | |
main | |
] | |
pull_request: | |
branches: [ | |
main | |
] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: "WMATAUI unit tests" | |
strategy: | |
matrix: | |
destination: [ | |
"'platform=macOS,variant=Mac Catalyst'", | |
"'platform=macOS'", | |
"'platform=tvOS Simulator,name=Apple TV'", | |
"'platform=iOS Simulator,name=iPhone 8'", | |
"'platform=watchOS Simulator,name=Apple Watch Series 5 (40mm)'" | |
] | |
runs-on: macos-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 50 | |
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
with: | |
path: .build | |
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
restore-keys: | | |
${{ runner.os }}-spm- | |
#- name: Set Xcode version | |
# run: sudo xcode-select -s /Applications/Xcode_13.2.1.app | |
- name: Build | |
# Using swift would be preferred, but using xcodebuild as it allows | |
# the specification of variants, which the swift command does not | |
run: xcodebuild build -scheme WMATAUI -destination ${{ matrix.destination }} | |
# run: swift build -v | |
- name: Run tests | |
# Using swift would be preferred, but using xcodebuild as it allows | |
# the specification of variants, which the swift command does not | |
run: | | |
xcodebuild test -scheme WMATAUI -destination ${{ matrix.destination }} -enableCodeCoverage YES | |
xcrun llvm-cov export --format="lcov" --instr-profile=$( echo ~/Library/Developer/Xcode/DerivedData/WMATAUI-*/Build/ProfileData/*/Coverage.profdata ) --object=$( echo ~/Library/Developer/Xcode/DerivedData/WMATAUI-*/Build/Products/Debug*/WMATAUI.o ) > coverage.lcov | |
# run: swift test -v | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
with: | |
files: coverage.lcov | |
fail_ci_if_error: true | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} |