generated from element-hq/.github
-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (38 loc) · 1.42 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# This workflow will build a Swift project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift
name: Tests
on:
push:
branches: [ main ]
pull_request:
jobs:
tests:
runs-on: macos-14
steps:
- name: Checkout code and snapshots
uses: nschloe/action-cached-lfs-checkout@v1
with:
submodules: recursive
- name: Configure Xcode 16
run: |
sudo xcode-select -s /Applications/Xcode_16.app
- name: Run tests
run: xcodebuild test -scheme 'Compound' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=18.0' -skipPackagePluginValidation -resultBundlePath Logs/CompoundTests.xcresult
- name: Zip artifacts
if: failure() # We only care about artefacts if the tests fail
run: zip -r Logs/CompoundTests.xcresult.zip Logs/CompoundTests.xcresult/
- name: Archive artifacts
uses: actions/upload-artifact@v4
if: failure() # We only care about artefacts if the tests fail
with:
name: test-results
path: Logs/CompoundTests.xcresult.zip
retention-days: 1
if-no-files-found: ignore
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: Logs/CompoundTests.xcresult