-
Notifications
You must be signed in to change notification settings - Fork 23
55 lines (46 loc) · 1.24 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
53
54
55
name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 3 * * MON"
workflow_dispatch:
jobs:
LintAndTest:
strategy:
fail-fast: false
matrix:
crystal_version:
- 0.35.1
- 0.36.1
- latest
experimental: [false]
include:
- crystal_version: nightly
experimental: true
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v2
- uses: oprypin/install-crystal@v1
with:
crystal: ${{matrix.crystal_version}}
- name: Check format
run: crystal tool format --check
- name: Set up Crystal cache
uses: actions/cache@v2
id: crystal-cache
with:
path: |
~/.cache/crystal
lib
key: ${{ runner.os }}-crystal-${{ matrix.crystal_version }}-${{ hashFiles('**/shard.lock') }}
restore-keys: |
${{ runner.os }}-crystal-${{ matrix.crystal_version }}
- name: Install shards
if: steps.crystal-cache.outputs.cache-hit != 'true'
run: shards check || shards install --ignore-crystal-version
- name: Run tests
run: crystal spec