-
Notifications
You must be signed in to change notification settings - Fork 42
50 lines (48 loc) · 1.34 KB
/
test.yml
File metadata and controls
50 lines (48 loc) · 1.34 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
name: Run unit tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
name: Lint check
runs-on: macOS-10.15
steps:
- uses: actions/checkout@v2
- run: pod lib lint
- run: swiftlint --strict
test_on_macOS:
name: Build and Test on macOS
strategy:
matrix:
xcode-version:
- /Applications/Xcode_11.4.1.app
- /Applications/Xcode_12.3.app
- /Applications/Xcode_12.4.app
runs-on: macOS-10.15
steps:
- uses: actions/checkout@v2
- run: sudo xcode-select -s "${{ matrix.xcode-version }}"
- run: swift --version
- run: swift test
test_Linux:
name: Build and Test on Linux
strategy:
matrix:
swift-version: ["5.2", "5.3", "5.4"]
runs-on: Ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup swiftenv
run: |
git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
export SWIFTENV_ROOT="$HOME/.swiftenv"
export PATH="$SWIFTENV_ROOT/bin:$PATH"
eval "$(swiftenv init -)"
echo "$PATH" >> $GITHUB_PATH
- run: rm .swift-version
- name: Install Swift
run: swiftenv install "${{ matrix.swift-version }}" --skip-existing
- run: swift --version
- run: swift test --enable-test-discovery