-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (58 loc) · 1.42 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
# Taken from the Invidious project
name: Lens CI
on:
schedule:
- cron: "0 0 * * *" # Every day at 00:00
push:
branches:
- "master"
pull_request:
branches: "*"
paths-ignore:
- "*.md"
- LICENCE
- .git*
- .editorconfig
jobs:
build:
runs-on: ubuntu-latest
name: "build - crystal: ${{ matrix.crystal }}, stable: ${{ matrix.stable }}"
continue-on-error: ${{ !matrix.stable }}
strategy:
fail-fast: false
matrix:
stable: [true]
crystal:
- 1.1.0
- 1.1.1
- 1.2.0
include:
- crystal: nightly
stable: false
steps:
- uses: actions/checkout@v2
- name: Install Crystal
uses: crystal-lang/[email protected]
with:
crystal: ${{ matrix.crystal }}
- name: Cache Shards
uses: actions/cache@v2
with:
path: ./lib
key: shards-${{ hashFiles('shard.lock') }}
- name: Install Shards
run: |
if ! shards check; then
shards install
fi
- name: Run tests
run: crystal spec --error-trace
- name: Run lint
run: |
if ! crystal tool format --check; then
crystal tool format
git diff
exit 1
fi
- name: Build
run: crystal build --warnings all --error-on-warnings --error-trace src/lens.cr