Skip to content

Commit 6a20bd0

Browse files
committed
Add GitHub workflows
1 parent b6fa033 commit 6a20bd0

2 files changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/lint.yml
7+
- .swift-format
8+
- "**/*.swift"
9+
push:
10+
paths:
11+
- .github/workflows/lint.yml
12+
- .swift-format
13+
- "**/*.swift"
14+
15+
jobs:
16+
17+
lint:
18+
name: Lint
19+
runs-on: ubuntu-latest
20+
container:
21+
image: swift:6.2
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
- name: Swift Version
26+
run: swift --version
27+
- name: Swift Format Lint
28+
run: swift format lint -r .

.github/workflows/test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
9+
linux:
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
image:
14+
- "6.0"
15+
- "6.1"
16+
- "6.2"
17+
name: Linux (Swift ${{ matrix.image }})
18+
runs-on: ubuntu-latest
19+
container:
20+
image: swift:${{ matrix.image }}
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
- name: Swift Version
25+
run: swift --version
26+
- name: Swift Build
27+
run: swift build -v -c debug
28+
- name: Swift Test
29+
run: swift test -v -c debug
30+
31+
macos:
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
image:
36+
- "15"
37+
name: macOS ${{ matrix.image }}
38+
runs-on: macos-${{ matrix.image }}
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@v4
42+
- name: Swift Version
43+
run: swift --version
44+
- name: Swift Build
45+
run: swift build -v -c debug
46+
- name: Swift Test
47+
run: swift test -v -c debug

0 commit comments

Comments
 (0)