Test formatter in dedicated CI workflow #290
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: CI | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
crystal: | |
type: string | |
default: nightly | |
shards: | |
type: string | |
default: nightly | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event.inputs }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-24.04, windows-2022, macos-13, macos-14] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: ${{ github.event.inputs.crystal || 'nightly' }} | |
shards: ${{ github.event.inputs.shards || 'nightly' }} | |
- name: Setup BATS | |
uses: mig4/setup-bats@v1 | |
with: | |
bats-version: 1.9.0 | |
- name: Configure git to not checkout CRLF | |
run: git config --global --add core.autocrlf false | |
- name: Test | |
run: | | |
bats --pretty --timing test --filter-tags !format | |
env: | |
WINDOWS_BASE_DIR: "/d/a" | |
TERM: dumb | |
test_format: | |
runs-on: ubuntu-24.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: ${{ github.event.inputs.crystal || 'nightly' }} | |
shards: ${{ github.event.inputs.shards || 'nightly' }} | |
- name: Setup BATS | |
uses: mig4/setup-bats@v1 | |
with: | |
bats-version: 1.9.0 | |
- name: Configure git to not checkout CRLF | |
run: git config --global --add core.autocrlf false | |
- name: Test | |
run: | | |
bats --pretty --timing test --filter-tags format | |
env: | |
WINDOWS_BASE_DIR: "/d/a" | |
TERM: dumb |