-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (37 loc) · 1.08 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
on:
push:
branches:
- master
tags:
- "v*.*.*"
schedule:
- cron: "15 3 * * 1" # Every monday at 3:15 AM
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache shards
uses: actions/cache@v2
with:
path: ~/.cache/shards
key: ${{ runner.os }}-shards-${{ hashFiles('shard.yml') }}
restore-keys: ${{ runner.os }}-shards-
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Install shards
run: shards check || shards install --without-development
- name: Check formatting
run: crystal tool format --check
- name: Run Ameba
run: bin/ameba --except Metrics/CyclomaticComplexity
- name: Run tests
run: crystal spec --order=random --error-on-warnings
- name: Build docs
run: crystal docs
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs