Skip to content

Commit 0af1f6a

Browse files
authored
Merge pull request #2 from syeopite/daily-ci
Add CI to test on different crystal versions
2 parents 9e02d88 + f5a407f commit 0af1f6a

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

.github/workflows/ci.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Protodec CI
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *" # Every day at 00:00
6+
push:
7+
branches:
8+
- "master"
9+
pull_request:
10+
branches: "*"
11+
paths-ignore:
12+
- "*.md"
13+
- LICENCE
14+
- .editorconfig
15+
16+
jobs:
17+
build-test:
18+
19+
runs-on: ubuntu-latest
20+
21+
name: "build and test - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}"
22+
23+
continue-on-error: ${{ !matrix.stable }}
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
stable: [true]
29+
crystal:
30+
- 1.0.0
31+
- 1.16.3
32+
- 1.17.1
33+
include:
34+
- crystal: nightly
35+
stable: false
36+
37+
steps:
38+
- uses: actions/checkout@v5
39+
40+
- name: Install Crystal
41+
uses: crystal-lang/[email protected]
42+
with:
43+
crystal: ${{ matrix.crystal }}
44+
45+
- name: Run tests
46+
run: crystal spec --error-trace
47+
48+
- name: Build
49+
run: crystal build --warnings all --error-on-warnings --error-trace src/protodec.cr
50+
51+
formatter:
52+
runs-on: ubuntu-latest
53+
continue-on-error: true
54+
55+
steps:
56+
- uses: actions/checkout@v5
57+
58+
- name: Install Crystal
59+
uses: crystal-lang/[email protected]
60+
with:
61+
crystal: latest
62+
63+
- name: Check Crystal formatter compliance
64+
run: |
65+
if ! crystal tool format --check; then
66+
crystal tool format
67+
git diff
68+
exit 1
69+
fi

0 commit comments

Comments
 (0)