WIP refactor of formatting and printers #59
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: Spectator CI | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: "0 6 * * 6" | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download source code | |
uses: actions/checkout@v4 | |
- name: Install Crystal | |
uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: latest | |
- name: Install shards | |
run: shards install | |
- name: Format | |
run: crystal tool format --check | |
- name: Lint | |
run: bin/ameba --fail-level warning | |
test: | |
name: Test | |
strategy: | |
fail-fast: false | |
matrix: | |
crystal: # Latest version plus 2 previous. | |
- latest | |
- nightly | |
- "1.11" | |
- "1.12" | |
- "1.13" | |
os: | |
- ubuntu-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Download source code | |
uses: actions/checkout@v4 | |
- name: Install Crystal | |
uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: ${{ matrix.crystal }} | |
- name: Cache shards | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/shards | |
key: ${{ runner.os }}-shards-${{ hashFiles('shard.yml') }} | |
restore-keys: ${{ runner.os }}-shards- | |
- name: Install shards | |
run: shards update --ignore-crystal-version | |
- name: Run tests | |
run: crystal spec --order=random --error-on-warnings |