-
Notifications
You must be signed in to change notification settings - Fork 10
150 lines (118 loc) · 3.84 KB
/
Copy pathci.yml
File metadata and controls
150 lines (118 loc) · 3.84 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
name: Build, test, and smoke
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 22
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@9.15.4 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Audit dependencies
run: pnpm audit --audit-level high
- name: Run project checks
run: pnpm check
- name: Build web app
run: pnpm build
- name: Compile local binary
run: pnpm tend:build
- name: Smoke test local binary
run: pnpm tend:smoke
- name: Package local binary
run: pnpm tend:package
mobile-database:
name: Supabase migration and bridge
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.11
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 22
- name: Enable pnpm
run: |
corepack enable
corepack prepare pnpm@9.15.4 --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Start local Supabase
run: pnpm exec supabase start
- name: Reset and test database
run: |
pnpm exec supabase db reset --local
pnpm exec supabase test db
- name: Run mobile bridge integration
shell: bash
run: |
eval "$(pnpm exec supabase status -o env)"
TEND_SUPABASE_E2E=1 \
TEND_TEST_SUPABASE_URL="$API_URL" \
TEND_TEST_SUPABASE_ANON_KEY="$ANON_KEY" \
TEND_TEST_SUPABASE_SERVICE_ROLE_KEY="$SERVICE_ROLE_KEY" \
TEND_TEST_SUPABASE_JWT_SECRET="$JWT_SECRET" \
bun test test/mobile-supabase-e2e.test.ts
- name: Stop local Supabase
if: always()
run: pnpm exec supabase stop --no-backup
ios:
name: Native iPhone tests
runs-on: macos-15
timeout-minutes: 30
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_26.3.app/Contents/Developer
- name: Install XcodeGen
run: brew install xcodegen
- name: Generate Xcode project
working-directory: ios
run: xcodegen generate
- name: Run unit and UI tests
shell: bash
run: |
SIMULATOR_ID="$(xcrun simctl list devices available -j | python3 -c 'import json, sys; devices = json.load(sys.stdin)["devices"]; print(next(device["udid"] for runtime in devices.values() for device in runtime if device.get("isAvailable") and device["name"].startswith("iPhone")))')"
xcodebuild test \
-project ios/Tend.xcodeproj \
-scheme Tend \
-destination "platform=iOS Simulator,id=$SIMULATOR_ID" \
-retry-tests-on-failure \
-test-iterations 2 \
-test-repetition-relaunch-enabled YES \
-resultBundlePath "$RUNNER_TEMP/TendTests.xcresult" \
CODE_SIGNING_ALLOWED=NO \
DEVELOPMENT_TEAM=
- name: Upload iOS test results
if: failure()
uses: actions/upload-artifact@v7
with:
name: TendTests-xcresult
path: ${{ runner.temp }}/TendTests.xcresult