-
Notifications
You must be signed in to change notification settings - Fork 19
133 lines (126 loc) · 5.34 KB
/
main.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
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
name: CI
on:
pull_request:
# The specific activity types are listed here to include "labeled" and "unlabeled"
# (which are not included by default for the "pull_request" trigger).
# This is needed to allow skipping enforcement of the changelog in PRs with specific labels,
# as defined in the (optional) "skipLabels" property.
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
push:
branches: main
env:
SIMULATOR: platform=iOS Simulator,name=iPhone 14,OS=16.0
DEVELOPER_DIR: /Applications/Xcode_14.0.1.app/Contents/Developer
jobs:
unit_test:
name: Unit Tests
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@main
with:
lfs: true
- name: Install CocoaPods Keys
run: gem install cocoapods-keys
- name: Dependencies
run: pod install --no-repo-update
- name: Build Planetary
run: set -o pipefail && xcodebuild build-for-testing -skipPackagePluginValidation -workspace Planetary.xcworkspace -scheme UnitTests -destination "$SIMULATOR" | xcpretty
- name: Run Tests
run: set -o pipefail && xcodebuild test-without-building -workspace Planetary.xcworkspace -scheme UnitTests -destination "$SIMULATOR" | xcpretty
changelog:
name: Check CHANGELOG
runs-on: ubuntu-latest
steps:
- uses: dangoslen/changelog-enforcer@v3
with:
skipLabels: 'Skip-Changelog'
missingUpdateErrorMessage: 'You have not updated CHANGELOG.md. If an entry is not applicable add the Skip-Changelog label to your PR. See the top of the CHANGELOG.md for more details.'
logger:
name: Logger
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@main
- name: Build for iOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -workspace Planetary.xcworkspace -scheme Logger -destination "$SIMULATOR" | xcpretty
- name: Run iOS tests
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -workspace Planetary.xcworkspace -scheme Logger -destination "$SIMULATOR" | xcpretty
secrets:
name: Secrets
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@main
- name: Build for iOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -workspace Planetary.xcworkspace -scheme Secrets -destination "$SIMULATOR" | xcpretty
- name: Run iOS tests
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -workspace Planetary.xcworkspace -scheme Secrets -destination "$SIMULATOR" | xcpretty
analytics:
name: Analytics
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@main
- name: Build for iOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -workspace Planetary.xcworkspace -scheme Analytics -destination "$SIMULATOR" | xcpretty
- name: Run iOS tests
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -workspace Planetary.xcworkspace -scheme Analytics -destination "$SIMULATOR" | xcpretty
crashreporting:
name: Crash Reporting
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@main
- name: Build for iOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -workspace Planetary.xcworkspace -scheme CrashReporting -destination "$SIMULATOR" | xcpretty
- name: Run iOS tests
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -workspace Planetary.xcworkspace -scheme CrashReporting -destination "$SIMULATOR" | xcpretty
support:
name: Support
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@main
- name: Build for iOS
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -workspace Planetary.xcworkspace -scheme Support -destination "$SIMULATOR" | xcpretty
- name: Run iOS tests
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -workspace Planetary.xcworkspace -scheme Support -destination "$SIMULATOR" | xcpretty
lfs-fsck:
name: Verify LFS files
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
with:
lfs: true
- name: Run gif lfs fsck
run: git lfs fsck
test_golang_bindings:
name: Test Go bindings
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Determine Go cache paths
id: golang-path
run: |
echo "build=$(go env GOCACHE)" >>"$GITHUB_OUTPUT"
echo "module=$(go env GOMODCACHE)" >>"$GITHUB_OUTPUT"
shell: bash
- name: Setup Go cache
uses: actions/cache@v3
with:
path: |
${{ steps.golang-path.outputs.build }}
${{ steps.golang-path.outputs.module }}
key: ${{ runner.os }}-golang-${{ hashFiles('GoSSB/Sources/go.sum', 'GoSSB/Sources/Makefile.ci') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Run tests
run: make -f Makefile.ci ci
working-directory: GoSSB/Sources/