-
Notifications
You must be signed in to change notification settings - Fork 0
/
github-actions-swift.yml
49 lines (46 loc) · 1.3 KB
/
github-actions-swift.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
name: Swift
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Build, Test, Lint
runs-on: macos-latest
strategy:
matrix:
destination: ["platform=iOS Simulator,name=iPad Pro (12.9-inch) (3rd generation),OS=13.3"]
steps:
- uses: actions/checkout@v2
- name: Install SwiftLint
env:
HOMEBREW_NO_AUTO_UPDATE: 1
run: brew install swiftlint
- name: Cache dependencies
uses: actions/cache@v1
with:
path: Hive2D/Pods
key: ${{ runner.OS }}-pods-cache-${{ hashFiles('**/Hive2D/Podfile.lock') }}
restore-keys: |
${{ runner.OS }}-pods-cache-
- name: Install dependencies
run: |
cd Hive2D
pod install
- name: Build
run: |
cd Hive2D
xcodebuild build-for-testing -workspace Hive2D.xcworkspace -scheme Hive2D -destination "${destination}"
env:
destination: ${{ matrix.destination }}
- name: Run tests
run: |
cd Hive2D
xcodebuild test-without-building -workspace Hive2D.xcworkspace -scheme Hive2D -destination "${destination}"
env:
destination: ${{ matrix.destination }}
- name: Run SwiftLint
run: |
cd Hive2D
swiftlint lint --reporter github-actions-logging