-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (66 loc) · 1.69 KB
/
test.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
name: Test
on:
push:
paths:
- '**.cr'
- '.github/workflows/test.yml'
pull_request:
branches: [master]
paths:
- '**.cr'
- '.github/workflows/test.yml'
schedule:
- cron: '0 6 * * 6'
jobs:
checks:
strategy:
fail-fast: false
matrix:
crystal: ['1.3.2']
runs-on: ubuntu-latest
continue-on-error: false
steps:
- name: Download source
uses: actions/checkout@v4
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Install shards
run: shards install
- name: Lint code
run: ./bin/ameba
specs:
strategy:
fail-fast: false
matrix:
crystal: ['1.0.0', latest]
experimental: [false]
include:
- crystal: nightly
experimental: true
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Download source
uses: actions/checkout@v4
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Cache shards
uses: actions/cache@v4
with:
path: ~/.cache/shards
key: ${{ runner.os }}-shards-${{ hashFiles('shard.yml') }}
restore-keys: ${{ runner.os }}-shards-
- name: Install shards
run: shards update
- name: Install Redis
run: sudo apt -y install redis
- name: Start Redis
run: sudo systemctl start redis
- name: Run tests
env:
REDIS_URL: redis://localhost:6379/0
run: crystal spec --error-on-warnings -Dpreview_mt