Skip to content

Commit 143ea6c

Browse files
authored
Add CI (#1)
1 parent 72c0639 commit 143ea6c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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: "Install protoc"
17+
run: apt update && apt install -y protobuf-compiler
18+
- name: "Formatting, License Headers, and Generated Code check"
19+
run: |
20+
./dev/sanity.sh
21+
unit-tests:
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- image: swiftlang/swift:nightly-jammy
27+
- image: swift:6.0-jammy
28+
name: Build and Test on ${{ matrix.image }}
29+
runs-on: ubuntu-latest
30+
container:
31+
image: ${{ matrix.image }}
32+
steps:
33+
- uses: actions/checkout@v4
34+
- name: 🔧 Build
35+
run: swift build ${{ matrix.swift-build-flags }}
36+
timeout-minutes: 20
37+
- name: 🧪 Test
38+
run: swift test ${{ matrix.swift-test-flags }}
39+
timeout-minutes: 20

0 commit comments

Comments
 (0)