-
Notifications
You must be signed in to change notification settings - Fork 9
45 lines (43 loc) · 1.43 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
# This CI job installs Crystal and shard dependencies, then executes `crystal spec` to run the test suite
# More configuration options are available at https://crystal-lang.github.io/install-crystal/configurator.html
name: Crystal Spec
on:
push:
pull_request:
branches:
# Branches from forks have the form 'user:branch-name' so we only run
# this job on pull_request events for branches that look like fork
# branches. Without this we would end up running this job twice for non
# forked PRs, once for the push and then once for opening the PR.
- "**:**"
schedule:
- cron: '0 6 * * 6' # Every Saturday 6 AM
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
crystal: 1.0.0
- os: ubuntu-latest
crystal: 1.2.0
- os: ubuntu-latest
- os: ubuntu-latest
crystal: nightly
- os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Install shards
run: shards install
- name: Run tests
run: crystal spec --order=random
- name: Check formatting
run: crystal tool format --check
if: matrix.crystal == null && matrix.os == 'ubuntu-latest'