Skip to content

Commit 0274d45

Browse files
committed
Updating CI build and test CI commands
1 parent 3467e61 commit 0274d45

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,29 @@ on:
1010
branches: [ "main" ]
1111

1212
jobs:
13-
build_and_test:
14-
strategy:
15-
matrix:
16-
os: [macos-latest, ubuntu-latest]
17-
swift-version: ["6.0.1"]
18-
runs-on: ${{ matrix.os }}
13+
build_and_test_macos:
14+
runs-on: macos-latest
1915
steps:
20-
- uses: swift-actions/setup-swift@v2
21-
with:
22-
swift-version: ${{ matrix.swift-version }}
16+
- uses: actions/checkout@v4
2317
- name: Get swift version
2418
run: swift --version
19+
- name: Build
20+
run: swift build -q
21+
- name: Run tests
22+
run: swift test -q
23+
24+
build_and_test_linux:
25+
runs-on: ubuntu-latest
26+
container:
27+
image: swift:6.0.1-jammy
28+
steps:
29+
- name: Install dependencies
30+
run: |
31+
apt-get update
32+
apt-get install -y curl git
2533
- uses: actions/checkout@v4
34+
- name: Get swift version
35+
run: swift --version
2636
- name: Build
2737
run: swift build -q
2838
- name: Run tests
@@ -37,7 +47,5 @@ jobs:
3747
uses: Homebrew/actions/setup-homebrew@master
3848
- name: Install swiftformat
3949
run: brew install swiftformat
40-
- name: Run linter
41-
run: swiftformat --config rules.swiftformat .
42-
- name: Verify that `swiftformat --config rules.swiftformat .` did not change outputs (if it did, please re-run it and re-commit!)
43-
run: git diff --exit-code
50+
- name: Check formatting
51+
run: swiftformat --config rules.swiftformat --lint .

0 commit comments

Comments
 (0)