-
Notifications
You must be signed in to change notification settings - Fork 23
96 lines (77 loc) · 2.37 KB
/
Copy pathchecks.yml
File metadata and controls
96 lines (77 loc) · 2.37 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
name: Checks
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
lint:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.2'
- uses: actions/checkout@v2
- name: Cache CocoaPods
uses: actions/cache@v3
with:
path: |
Pods
~/Library/Caches/CocoaPods
~/.cocoapods/repos
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Validation
run: |
pod lib lint --verbose
spm:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.2'
- uses: actions/checkout@v2
- name: SPM validation
run: |
swift build
common-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Verify API base URL
run: |
EXPECTED_URL="https://api2.qonversion.io/"
MAIN_URL=$(grep 'kAPIBase = @"' Sources/Qonversion/Qonversion/Constants/QNAPIConstants/QNAPIConstants.m | sed 's/.*@"//;s/".*//')
NOCODES_URL=$(grep 'baseURL = "' Sources/NoCodes/Assemblies/ServicesAssembly.swift | sed 's/.*= "//;s/".*//')
FAILED=0
if [ "$MAIN_URL" != "$EXPECTED_URL" ]; then
echo "::error::Main API URL mismatch: expected '$EXPECTED_URL', got '$MAIN_URL'"
FAILED=1
fi
if [ "$NOCODES_URL" != "$EXPECTED_URL" ]; then
echo "::error::NoCodes API URL mismatch: expected '$EXPECTED_URL', got '$NOCODES_URL'"
FAILED=1
fi
if [ "$FAILED" -eq 1 ]; then
exit 1
fi
echo "API URLs verified: $EXPECTED_URL"
tests:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.2'
- uses: actions/checkout@v2
- name: Cache CocoaPods
uses: actions/cache@v3
with:
path: |
Pods
~/Library/Caches/CocoaPods
~/.cocoapods/repos
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Tests
run: |
fastlane tests