Workflow file for this run
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: "xcode-recoreon-uitests" | |
"on": | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "main" | |
defaults: | |
run: | |
shell: "bash" | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: "${{ github.ref != 'refs/heads/main' }}" | |
env: | |
IOS_DEVICE: "iPhone 15" | |
IOS_RUNTIME: "17.4" | |
DEVELOPER_DIR: "/Applications/Xcode_15.3.app" | |
TEST_PLAN_NAME: "RecoreonUITests" | |
# yamllint disable rule:line-length | |
jobs: | |
XcodeRecoreonUITests: | |
runs-on: "macos-14" | |
steps: | |
- name: "Start yeetd" | |
working-directory: "${{ runner.temp }}" | |
run: | | |
wget https://github.com/biscuitehh/yeetd/releases/download/1.0/yeetd-normal.pkg | |
sudo installer -pkg yeetd-normal.pkg -target / | |
yeetd & | |
- name: "Brew install" | |
run: "brew install xcodegen" | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Xcodegen" | |
run: "xcodegen generate" | |
- name: "Build tests" | |
run: | | |
xcodebuild \ | |
-sdk iphonesimulator \ | |
-project ./Recoreon.xcodeproj \ | |
-scheme Recoreon \ | |
-testPlan "$TEST_PLAN_NAME" \ | |
-derivedDataPath ./DerivedData \ | |
-testProductsPath "./$TEST_PLAN_NAME.xctestproducts" \ | |
build-for-testing | |
- name: "Run tests" | |
run: | | |
xcodebuild \ | |
-derivedDataPath ./DerivedData \ | |
-destination "platform=iOS Simulator,name=$IOS_DEVICE,OS=$IOS_RUNTIME" \ | |
-testProductsPath ./$TEST_PLAN_NAME.xctestproducts \ | |
test-without-building | |
- name: "Export Swift coverage" | |
run: | | |
xcrun llvm-cov show \ | |
--arch arm64 \ | |
--instr-profile ./DerivedData/Build/ProfileData/*/Coverage.profdata \ | |
--ignore-filename-regex=".*/Recoreon/(Models|Preview Content|Services|Stores)/.*" \ | |
./DerivedData/Build/Products/Debug-iphonesimulator/Recoreon.app/Recoreon \ | |
>"$TEST_PLAN_NAME.coverage.txt" | |
- name: "Upload coverage to Codecov" | |
uses: "codecov/codecov-action@v4" | |
with: | |
token: "${{ secrets.CODECOV_TOKEN }}" | |
disable_search: true | |
files: "${{ env.TEST_PLAN_NAME }}.coverage.txt" | |
# yamllint enable |