@@ -10,14 +10,14 @@ jobs:
10
10
name : Format linting
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - uses : actions/checkout@v3
14
- - uses : sinoru/ actions-setup-swift@v2
15
- with :
16
- swift-version : ' 5.6.1 '
17
- - name : GitHub Action for SwiftFormat
18
- uses : CassiusPacheco/action- swiftformat@v0.1.0
19
- with :
20
- swiftformat-version : ' 0.49.17 '
13
+ - name : Checkout
14
+ uses : actions/checkout@v3
15
+ - name : Set up Docker Buildx
16
+ uses : docker/setup-buildx-action@v2
17
+ - name : Pull formatting docker image
18
+ run : docker pull ghcr.io/nicklockwood/ swiftformat:latest
19
+ - name : Run format linting
20
+ run : docker run --rm -v ${{ github.workspace }}:/repo ghcr.io/nicklockwood/swiftformat:latest /repo --lint
21
21
macos-build :
22
22
name : Build and test on ${{ matrix.os }}
23
23
runs-on : ${{ matrix.os }}
@@ -33,18 +33,35 @@ jobs:
33
33
run : swift build
34
34
- name : Run tests
35
35
run : swift test
36
- linux-build :
37
- name : Build and test ${{ matrix.swift }} on ${{ matrix.os }}
36
+
37
+ # ubuntu-latest is ubuntu-22.04 currently. Swift versions older than 5.7 don't have builds for 22.04. https://www.swift.org/download/
38
+ ubuntu-old :
39
+ name : Build ${{ matrix.swift }} on ${{ matrix.os }}
38
40
runs-on : ${{ matrix.os }}
39
41
strategy :
40
42
matrix :
41
- os : [ubuntu-latest]
43
+ os : [ubuntu-20.04]
42
44
swift : ["5.4", "5.5", "5.6"]
43
45
steps :
44
- - uses : swift-actions/setup-swift@v1
45
- with :
46
- swift-version : ${{ matrix.swift }}
47
- - uses : actions/checkout@v2
48
- - name : Test
49
- run : swift test
46
+ - uses : swift-actions/setup-swift@v1
47
+ with :
48
+ swift-version : ${{ matrix.swift }}
49
+ - uses : actions/checkout@v3
50
+ - name : Test
51
+ run : swift test
52
+
53
+ ubuntu-latest :
54
+ name : Build ${{ matrix.swift }} on ${{ matrix.os }}
55
+ runs-on : ${{ matrix.os }}
56
+ strategy :
57
+ matrix :
58
+ os : [ubuntu-latest]
59
+ swift : ["5.7"]
60
+ steps :
61
+ - uses : swift-actions/setup-swift@v1
62
+ with :
63
+ swift-version : ${{ matrix.swift }}
64
+ - uses : actions/checkout@v3
65
+ - name : Test
66
+ run : swift test
50
67
0 commit comments