-
Notifications
You must be signed in to change notification settings - Fork 30
52 lines (44 loc) · 1.16 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
specs:
strategy:
fail-fast: false
matrix:
include:
- {os: ubuntu-latest, crystal: latest}
- {os: ubuntu-latest, crystal: nightly}
- {os: macos-latest}
- {os: windows-latest}
runs-on: ${{matrix.os}}
name: Crystal ${{ matrix.crystal }} specs on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@master
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Crystal Ameba Linter
if: matrix.os == 'ubuntu-latest'
uses: crystal-ameba/github-action@v0.9.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: shards install --without-development
- name: Run specs
run: crystal spec --error-on-warnings --error-trace
- name: Run formatting checks
if: matrix.os != 'windows-latest'
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi