Skip to content

Commit 8cae24c

Browse files
authored
Fix CI (#71)
1 parent fa8e2d5 commit 8cae24c

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,28 @@ env:
3232
jobs:
3333
swift-tests:
3434
timeout-minutes: 15
35-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-latest
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
swift: [ "6.0" ]
40-
name: swift ${{ matrix.swift }} tests
39+
swift_version: ['6.0']
40+
os_version: ['jammy']
41+
container:
42+
image: swift:${{ matrix.swift_version }}-${{ matrix.os_version }}
43+
name: swift ${{ matrix.swift_version }} tests
4144
steps:
42-
- uses: slashmo/install-swift@v0.4.0
43-
with:
44-
version: ${{ matrix.swift }}
45-
- uses: actions/checkout@v4
45+
- name: Swift version
46+
run: swift --version
47+
- name: Checkout repository
48+
uses: actions/checkout@v4
4649
- name: Run tests
4750
run: swift test --configuration release --parallel
4851
pre-commit:
4952
timeout-minutes: 1
5053
runs-on: ubuntu-latest
5154
steps:
52-
- uses: actions/checkout@v4
55+
- name: Checkout repository
56+
uses: actions/checkout@v4
5357
- name: Install pre-commit
5458
run: pip install pre-commit
5559
- name: Pre-commit checks
@@ -59,23 +63,25 @@ jobs:
5963
SKIP=no-commit-to-branch,check-doc-comments,lockwood-swiftformat,swiftlint,insert-license
6064
pre-commit run --all-files
6165
insert-license:
62-
timeout-minutes: 1
63-
runs-on: ubuntu-latest
64-
steps:
65-
- uses: actions/checkout@v4
66-
with:
67-
fetch-depth: 2
68-
- name: Install pre-commit
69-
run: pip install pre-commit
70-
- name: List changed files
71-
run: git diff --name-only HEAD~1
72-
- name: Run license check
73-
run: pre-commit run insert-license --files $(git diff --name-only HEAD~1)
66+
timeout-minutes: 1
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Checkout repository
70+
uses: actions/checkout@v4
71+
with:
72+
fetch-depth: 2
73+
- name: Install pre-commit
74+
run: pip install pre-commit
75+
- name: List changed files
76+
run: git diff --name-only HEAD~1
77+
- name: Run license check
78+
run: pre-commit run insert-license --files $(git diff --name-only HEAD~1)
7479
lint:
7580
timeout-minutes: 15
7681
runs-on: ubuntu-latest
7782
steps:
78-
- uses: actions/checkout@v4
83+
- name: Checkout repository
84+
uses: actions/checkout@v4
7985
- name: Cache SwiftLint
8086
id: cache-swiftlint
8187
uses: actions/cache@v4
@@ -92,7 +98,8 @@ jobs:
9298
timeout-minutes: 5
9399
runs-on: ubuntu-latest
94100
steps:
95-
- uses: actions/checkout@v4
101+
- name: Checkout repository
102+
uses: actions/checkout@v4
96103
- name: Cache SwiftFormat
97104
id: cache-swiftformat
98105
uses: actions/cache@v4

0 commit comments

Comments
 (0)