Skip to content

Commit d338222

Browse files
authored
Merge pull request #1 from glbrntt/add-ci
Add CI workflow
2 parents bd58bb0 + 440a117 commit d338222

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
on:
3+
pull_request:
4+
branches: [main]
5+
jobs:
6+
preflight:
7+
name: License Header and Formatting Checks
8+
runs-on: ubuntu-latest
9+
container:
10+
image: swift:6.0-jammy
11+
steps:
12+
- name: "Checkout repository"
13+
uses: actions/checkout@v4
14+
- name: Mark the workspace as safe
15+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
16+
- name: "Formatting, License Headers, and Generated Code check"
17+
run: |
18+
./dev/sanity.sh
19+
unit-tests:
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- image: swiftlang/swift:nightly-jammy
25+
- image: swift:6.0-jammy
26+
name: Build and Test on ${{ matrix.image }}
27+
runs-on: ubuntu-latest
28+
container:
29+
image: ${{ matrix.image }}
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: 🔧 Build
33+
run: swift build ${{ matrix.swift-build-flags }}
34+
timeout-minutes: 20
35+
- name: 🧪 Test
36+
run: swift test ${{ matrix.swift-test-flags }}
37+
timeout-minutes: 20

0 commit comments

Comments
 (0)