-
Notifications
You must be signed in to change notification settings - Fork 51
69 lines (63 loc) · 2.08 KB
/
test.yml
File metadata and controls
69 lines (63 loc) · 2.08 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
name: Test
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
schedule:
- cron: 13 7 * * 6
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crystal_version: ${{ github.event_name == 'schedule' && fromJSON('["latest"]') || fromJSON('["1.15.1", "1.16.3", "1.17.1", "1.18.2", "latest"]') }}
experimental: [false]
include:
- crystal_version: nightly
experimental: true
services:
minio:
# https://stackoverflow.com/questions/60849745/how-can-i-run-a-command-in-github-action-service-containers
image: public.ecr.aws/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
name: Crystal ${{ matrix.crystal_version }}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: "[Git] Checkout code"
uses: actions/checkout@v4
- uses: crystal-lang/install-crystal@v1
name: "[Setup] Install Crystal"
with:
crystal: ${{ matrix.crystal_version }}
- name: "[Setup] Install dependencies"
run: shards install
- name: "[Test] Run specs"
# NOTICE: Set order 1 until fix the problem with https://github.com/crystal-lang/crystal/issues/9065
run: crystal spec || scripts/run_batched_specs
env:
LOG_LEVEL: trace
CRYSTAL_WORKERS: 1
- name: "[Test] Compile files with release flag"
run: crystal build --release --stats --progress src/awscr-s3.cr
- name: "[Test] Smoke tests"
env:
LOG_LEVEL: trace
run: |
for example in examples/*.cr; do
echo " > Processing $example..."
crystal run --debug $example
done