-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (72 loc) · 2.28 KB
/
ci.yml
File metadata and controls
90 lines (72 loc) · 2.28 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
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
85
86
87
88
89
90
name: Crystal CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build-ubuntu:
strategy:
fail-fast: false
matrix:
crystal: [latest, nightly]
runs-on: ubuntu-latest
# Setup copied from the aswscr-s3 project:
# https://github.com/taylorfinnell/awscr-s3/blob/44d9da5cc6e1361a04df9c45b5765af322db0556/.github/workflows/test.yml#L26C1-L41C30
services:
minio:
# https://stackoverflow.com/questions/60849745/how-can-i-run-a-command-in-github-action-service-containers
image: bitnami/minio:latest
env:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: password
ports:
- 9000:9000
# https://github.com/orgs/community/discussions/26688
options: >-
--health-cmd "curl -s http://localhost:9000/minio/health/live"
--health-interval=10s
--health-timeout=5s
--health-retries=5
--name minio-server
steps:
- name: Install Crystal
uses: oprypin/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Download source
uses: actions/checkout@v4
- name: Check code formatting
run: crystal tool format --check
- name: Install dependencies
run: shards install
- name: Lint with Ameba
run: bin/ameba
- name: Run specs
run: crystal spec --verbose --tag '~slow' --order random
env:
EASY_AWSCR_SPEC_USE_MINIO: true
# Without Docker, tests can be still executed, but they will be crippled.
build-macos-without-docker:
strategy:
fail-fast: false
matrix:
crystal: [latest, nightly]
runs-on: macos-latest
steps:
- name: Install Crystal
uses: oprypin/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Download source
uses: actions/checkout@v4
- name: Check code formatting
run: crystal tool format --check
- name: Install dependencies
run: shards install
- name: Lint with Ameba
run: bin/ameba
- name: Run specs
run: crystal spec --verbose --tag '~slow' --order random
- name: Run specs
run: crystal spec --verbose --tag '~slow' --order random