-
Notifications
You must be signed in to change notification settings - Fork 7
84 lines (81 loc) · 2.26 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
push:
pull_request:
schedule:
- cron: "0 0 * * 1" # Midnight monday
jobs:
style:
name: Style
runs-on: ubuntu-latest
container: crystallang/crystal:latest
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
name: "Test - crystal: ${{ matrix.crystal }}, MT: ${{ matrix.MT }}, stable: ${{ matrix.stable }}"
continue-on-error: ${{ !matrix.stable }}
strategy:
fail-fast: false
matrix:
crystal:
- 0.35.1
- 0.36.1
- 1.0.0
- 1.1.1
stable: [true]
MT: [false]
include:
- crystal: 1.1.1
MT: true
stable: false
- crystal: nightly
MT: true
stable: false
- crystal: nightly
MT: false
stable: false
services:
rethink:
image: rethinkdb:2.4
ports:
- 29015:29015
- 28015:28015
steps:
- uses: actions/checkout@v2
- uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Up open file limit
run: ulimit -n 10000
- run: shards install --ignore-crystal-version
- name: Test
if: ${{ !matrix.MT }}
run: crystal spec --error-trace -v --no-color
- name: Test Multithreading
if: ${{ matrix.MT }}
run: crystal spec --error-trace -v --no-color -Dpreview_mt
publish:
name: Publish Documentation
if: contains('refs/tags', github.ref)
runs-on: ubuntu-latest
container: crystallang/crystal:latest
steps:
- uses: actions/checkout@v2
- run: shards install --ignore-crystal-version
- name: Run `crystal docs`
run: https://github.com/kingsleyh/crystal-rethinkdb/tree/$(shards version)
- name: Publish to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: docs
build_dir: docs
commit_message: "Update docs for ${{ github.ref }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}