mirror of
https://github.com/iv-org/protodec.git
synced 2025-12-10 05:56:41 -05:00
Add CI to test on different crystal versions
This commit is contained in:
parent
9e02d88a19
commit
f5a407f862
1 changed files with 69 additions and 0 deletions
69
.github/workflows/ci.yml
vendored
Normal file
69
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
name: Protodec CI
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Every day at 00:00
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
pull_request:
|
||||
branches: "*"
|
||||
paths-ignore:
|
||||
- "*.md"
|
||||
- LICENCE
|
||||
- .editorconfig
|
||||
|
||||
jobs:
|
||||
build-test:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: "build and test - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}"
|
||||
|
||||
continue-on-error: ${{ !matrix.stable }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
stable: [true]
|
||||
crystal:
|
||||
- 1.0.0
|
||||
- 1.16.3
|
||||
- 1.17.1
|
||||
include:
|
||||
- crystal: nightly
|
||||
stable: false
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Install Crystal
|
||||
uses: crystal-lang/install-crystal@v1.8.2
|
||||
with:
|
||||
crystal: ${{ matrix.crystal }}
|
||||
|
||||
- name: Run tests
|
||||
run: crystal spec --error-trace
|
||||
|
||||
- name: Build
|
||||
run: crystal build --warnings all --error-on-warnings --error-trace src/protodec.cr
|
||||
|
||||
formatter:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Install Crystal
|
||||
uses: crystal-lang/install-crystal@v1.8.2
|
||||
with:
|
||||
crystal: latest
|
||||
|
||||
- name: Check Crystal formatter compliance
|
||||
run: |
|
||||
if ! crystal tool format --check; then
|
||||
crystal tool format
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue