-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.15 KB
/
swift.yaml
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
name: swift test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-on-mac:
name: Test on macOS
strategy:
matrix:
xcode-version:
- /Applications/Xcode_15.0.app
runs-on: macOS-latest
steps:
- uses: actions/checkout@v3
- run: sudo xcode-select -s "${{ matrix.xcode-version }}" || true
- run: swift --version
- run: swift build --build-tests
- run: swift test
test-on-ubuntu:
name: Test on Ubuntu
strategy:
matrix:
swift-version: ["5.9", "5.10"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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
- name: Install Swift
run: swiftenv install "${{ matrix.swift-version }}" --skip-existing
- run: swift --version
- run: swift build --build-tests --enable-test-discovery
- run: swift test --enable-test-discovery