-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.06 KB
/
ci.yml
File metadata and controls
53 lines (44 loc) · 1.06 KB
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
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
crystal:
- latest
- nightly
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Cache shards
uses: actions/cache@v3
with:
path: ~/.cache/shards
key: shards-${{ hashFiles('shard.lock') }}
restore-keys: shards-
- name: Install dependencies
run: shards install
- name: Run tests
env:
REDIS_URL: redis://localhost:6379/0
run: crystal spec
- name: Check code formatting
run: crystal tool format --check