Skip to content

chore(deps): bump actions/upload-pages-artifact from 1 to 2 #168

chore(deps): bump actions/upload-pages-artifact from 1 to 2

chore(deps): bump actions/upload-pages-artifact from 1 to 2 #168

Workflow file for this run

---
name: Swift
on:
push:
branches: [
main
]
pull_request:
branches: [
main
]
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-12
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
- uses: actions/cache@v3
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@v3
with:
files: coverage.lcov
fail_ci_if_error: true
verbose: true