-
Notifications
You must be signed in to change notification settings - Fork 15
164 lines (136 loc) · 4.25 KB
/
Copy pathci.yml
File metadata and controls
164 lines (136 loc) · 4.25 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: CI Pipeline
on:
push:
branches: ['main']
pull_request:
types: [opened, synchronize]
env:
RUBY_VERSION: '3.1.2'
JAVA_VERSION: '22'
jobs:
lint-swift:
name: Lint Swift code
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Run SwiftLint
uses: norio-nomura/action-swiftlint@9f4dcd7fd46b4e75d7935cf2f4df406d5cae3684 # 3.2.1
with:
args: --strict
license:
name: Verify license headers
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- run: ./scripts/copy_license --check
check-packed-files:
name: Check package files
runs-on: ubuntu-latest
timeout-minutes: 5
env:
TERM: xterm
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Setup
uses: ./.github/actions/setup
- run: |
yarn module clean
yarn module build
yarn compare-snapshot
lint:
name: Lint module + sample
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Setup
uses: ./.github/actions/setup
- run: |
yarn module build
yarn module lint
yarn sample lint
test:
name: Run jest tests
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Setup
uses: ./.github/actions/setup
- run:
yarn test --coverage
--testPathPatterns="modules/@shopify/checkout-sheet-kit/tests"
--coverageReporters=json-summary
- name: Coverage comment
if: github.event_name == 'pull_request'
uses: MishaKav/jest-coverage-comment@main
with:
coverage-summary-path: ./coverage/coverage-summary.json
title: 'Coverage Report'
create-new-comment: false
test-android:
name: Run Android Tests
runs-on: ubuntu-latest
timeout-minutes: 20
needs: [lint, test]
steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Setup
uses: ./.github/actions/setup
- name: Install JDK
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
id: setup-java
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}
- name: Run Android tests
timeout-minutes: 20
env:
GRADLE_OPTS: -Xmx4g -XX:MaxMetaspaceSize=768m
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
run: |
echo "JAVA_HOME: $JAVA_HOME"
java -version
javac -version
echo "STOREFRONT_DOMAIN=myshopify.com" > sample/.env
yarn module build
yarn sample test:android --no-daemon
test-ios:
name: Run iOS Tests
runs-on: macos-15-xlarge
timeout-minutes: 20
needs: [lint, lint-swift, test]
steps:
- name: Checkout
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
- name: Switch to Xcode 16.4
run: |
sudo xcode-select --switch /Applications/Xcode_16.4.app
- name: Display Current Xcode Information
run: |
echo "Xcode Path: $(xcode-select -p)"
echo "Xcode Version: $(xcrun xcodebuild -version)"
- name: Setup iOS Simulator
uses: ./.github/actions/setup-simulator
- name: Setup
uses: ./.github/actions/setup
- name: Check turbo cache
uses: ./.github/actions/use-turbo-cache
- name: Check build cache
run: |
CACHE_STATUS=$(./scripts/check_cache sample test:ios)
echo "[sample] build:ios - $CACHE_STATUS"
echo "turbo_cache_hit=$CACHE_STATUS" >> $GITHUB_ENV
- name: Install cocoapods
uses: ./.github/actions/install-cocoapods
with:
ruby-version: ${{ env.RUBY_VERSION }}
- name: Run Swift tests
run: |
yarn sample test:ios