Skip to content

Updating changelog #452

Updating changelog

Updating changelog #452

Workflow file for this run

name: Run Swift Tests
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
workflow_dispatch: {}
pull_request: {}
push:
branches:
- main
jobs:
run-tests:
timeout-minutes: 30
runs-on: macos-14
strategy:
fail-fast: false
matrix:
xcode_version: ["15.4"]
steps:
- name: Select Xcode
# See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md
run: |
sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version }}.app
xcodebuild -version
- uses: actions/checkout@v4
timeout-minutes: 2
- name: Cache SPM Dependencies
uses: actions/cache@v4
with:
path: |
.build/checkouts
.build/artifacts
.build/*-apple-*/debug/Swift*
.build/*-apple-*/debug/SourceKit*
.build/*-apple-*/debug/ArgumentParser*
key: ${{ runner.os }}-spm-build-cache-test-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-build-cache-test
- name: Display Available SDKs
run: xcodebuild -showsdks -json
timeout-minutes: 1
continue-on-error: true
- name: Display Available Simulators
run: |
xcrun simctl list -j devices available
timeout-minutes: 2
continue-on-error: true
- name: Run Tests
run: bin/test | xcpretty && exit ${PIPESTATUS[0]}
timeout-minutes: 30
- uses: kishikawakatsumi/xcresulttool@v1
if: always()
with:
path: .build/test/output.xcresult
title: "Test Results"
show-passed-tests: true
show-code-coverage: true
upload-bundles: true
- name: Convert results for Codecov
run: |
brew install a7ex/homebrew-formulae/xcresultparser
xcresultparser --output-format cobertura .build/test/output.xcresult > .build/test/output.xcresult.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
plugin: xcode
file: .build/test/output.xcresult.xml
fail_ci_if_error: true