2021-01-11 17:21:32 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-01-02 17:41:46 +00:00
|
|
|
branches: [master]
|
2021-01-11 17:21:32 +00:00
|
|
|
pull_request:
|
2023-01-02 17:41:46 +00:00
|
|
|
types: [opened, synchronize, reopened]
|
2021-01-11 17:21:32 +00:00
|
|
|
schedule:
|
|
|
|
- cron: "0 3 * * 1" # Every monday at 3 AM
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest]
|
|
|
|
crystal: [latest, nightly]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install Crystal
|
2022-12-21 15:08:16 +00:00
|
|
|
uses: crystal-lang/install-crystal@v1
|
2021-01-11 17:21:32 +00:00
|
|
|
with:
|
|
|
|
crystal: ${{ matrix.crystal }}
|
|
|
|
|
|
|
|
- name: Download source
|
2022-12-21 15:08:16 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-01-11 17:21:32 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: shards install
|
|
|
|
|
|
|
|
- name: Run specs
|
|
|
|
run: make test
|
|
|
|
|
|
|
|
- name: Check formatting
|
|
|
|
run: crystal tool format --check
|