Skip to content

Test workflow

Test workflow #135

Workflow file for this run

name: Test workflow
on:
pull_request:
branches: [master]
workflow_dispatch: {}
schedule:
- cron: "0 2 * * 5" # Every friday at 2 AM
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: crystal-lang/install-crystal@v1
- name: Cache shards
uses: actions/cache@v3
with:
path: lib
key: ${{ runner.os }}-shards-${{ hashFiles('**/shard.lock') }}
restore-keys: ${{ runner.os }}-shards-
- name: Install shards
run: shards check || shards install
- name: Run ameba
run: crystal bin/ameba.cr
- name: Check format
run: crystal tool format --check
- name: Run tests
run: crystal spec --order=random --error-on-warnings
- name: Build
run: shards build --stats --progress --local