-
Notifications
You must be signed in to change notification settings - Fork 3
55 lines (47 loc) · 1.28 KB
/
build-and-test.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
name: Build & Test
concurrency:
group: "quality"
cancel-in-progress: true
on:
push:
branches:
- main
- release
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- release
jobs:
build:
name: Build & Test
runs-on: macos-14
strategy:
matrix:
scheme:
- "CompoundPredicate"
steps:
- name: Install Swift
# uses: swift-actions/setup-swift@???
uses: marcprux/setup-swift@691b6b72e1477342a320edc7df795783d11abc36
with:
swift-version: 5.10.0
- name: Get swift version
run: swift --version
- uses: actions/checkout@v4
- name: Cache Dependencies
uses: actions/[email protected]
with:
path: .build
key: ${{ runner.os }}-${{ matrix.scheme }}-spm-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-${{ matrix.scheme }}-spm2-
- name: Cache DerivedData
uses: actions/[email protected]
with:
path: "~/Library/Developer/Xcode/DerivedData"
key: ${{ runner.os }}-${{ matrix.scheme }}-deriveddata
- name: Build
run: swift build
- name: Run tests
run: swift test