Skip to content

[EMBR-1911] DB Migrations (#211) #41

[EMBR-1911] DB Migrations (#211)

[EMBR-1911] DB Migrations (#211) #41

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-13
strategy:
fail-fast: false
matrix:
xcode_version: ["15.1"]
steps:
- name: Select Xcode
# See https://github.com/actions/runner-images/blob/main/images/macos/macos-13-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@v3
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: embrace-io/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: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: unittests
fail_ci_if_error: true
xcode: true
xcode_archive_path: .build/test/output.xcresult