Test #24
This file contains 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: Test | |
on: | |
push: | |
paths: | |
- '**.cr' | |
- '.github/workflows/test.yml' | |
pull_request: | |
branches: [master] | |
paths: | |
- '**.cr' | |
- '.github/workflows/test.yml' | |
schedule: | |
- cron: '0 7 * * 6' | |
jobs: | |
checks: | |
strategy: | |
fail-fast: false | |
matrix: | |
crystal: ['1.3.2'] | |
runs-on: ubuntu-latest | |
continue-on-error: false | |
steps: | |
- name: Download source | |
uses: actions/checkout@v3 | |
- name: Install Crystal | |
uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: ${{ matrix.crystal }} | |
- name: Install shards | |
run: shards install | |
- name: Lint code | |
run: ./bin/ameba | |
specs: | |
strategy: | |
fail-fast: false | |
matrix: | |
crystal: ['1.0.0', latest] | |
experimental: [false] | |
include: | |
- crystal: nightly | |
experimental: true | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
steps: | |
- name: Download source | |
uses: actions/checkout@v3 | |
- name: Install Crystal | |
uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: ${{ matrix.crystal }} | |
- name: Cache shards | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/shards | |
key: ${{ runner.os }}-shards-${{ hashFiles('shard.yml') }} | |
restore-keys: ${{ runner.os }}-shards- | |
- name: Install shards | |
run: shards update | |
- name: Run tests | |
run: crystal spec --error-on-warnings |