-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (69 loc) · 2.25 KB
/
xcode-recoreon-uitests.yaml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
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