Protodec CI #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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/[email protected] | |
with: | |
crystal: latest | |
- name: Check Crystal formatter compliance | |
run: | | |
if ! crystal tool format --check; then | |
crystal tool format | |
git diff | |
exit 1 | |
fi |