-
Notifications
You must be signed in to change notification settings - Fork 3
54 lines (52 loc) · 1.27 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
name: CI
on:
push:
jobs:
style:
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v2
- name: Format
run: crystal tool format --check
- name: Lint
uses: crystal-ameba/github-action@v0.2.12
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crystal:
- latest
- nightly
- 1.0.0
- 0.36.1
steps:
- uses: oprypin/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- uses: actions/checkout@v2
- run: shards install
- name: Tests
run: crystal spec --error-trace -v --order=random --no-color
publish:
if: contains('refs/heads/master', github.ref)
needs: test
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v2
- run: shards install
- name: Generate documentation
run: crystal docs
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}