8000 Merge pull request #32 from abhinav/ci · tiehuis/zig-regex@8251813 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8251813

Browse files
authored
Merge pull request #32 from abhinav/ci
Set up a GitHub workflow
2 parents 544ee47 + 1bc784d commit 8251813

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: ['*']
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
14+
lint:
15+
name: Lint
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- uses: goto-bus-stop/setup-zig@v2
22+
with:
23+
version: 0.11.0 # most recent stable
24+
25+
- name: Check formatting
26+
run: zig fmt --check .
27+
28+
test:
29+
name: Test / Zig ${{ matrix.zig-version }}
30+
runs-on: ubuntu-latest
31+
continue-on-error: ${{ matrix.allow-fail }}
32+
33+
strategy:
34+
matrix:
35+
zig-version: ['0.11.0']
36+
os: [ubuntu-latest]
37+
allow-fail: [false]
38+
include:
39+
# Test against Zig master but don't break from it.
40+
# master is a constantly moving target,
41+
# so we'll fix issues on a best-effort basis.
42+
- zig-version: master
43+
os: ubuntu-latest
44+
allow-fail: true
45+
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v4
49+
50+
- name: Set up Zig
51+
uses: goto-bus-stop/setup-zig@v2
52+
with:
53+
version: ${{ matrix.zig-version }}
54+
55+
- name: Run tests
56+
run: zig build test

0 commit comments

Comments
 (0)
0