Skip to content

Crystal CI

Crystal CI #585

Workflow file for this run

name: Crystal CI
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
check_format:
runs-on: ubuntu-latest
container: crystallang/crystal
steps:
- name: Check out repository code
uses: actions/checkout@v6
- name: Check format
run: crystal tool format --check
check_ameba:
runs-on: ubuntu-latest
container: crystallang/crystal
steps:
- name: Check out repository code
uses: actions/checkout@v6
# Performs a clean installation of all dependencies in the `shard.yml` file
- name: Install dependencies
run: shards install
- name: Check ameba
run: ./bin/ameba
test:
runs-on: ubuntu-latest
strategy:
matrix:
crystal: [latest, nightly]
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
ports:
# Maps port 6379 on service container to the host
- 6379:6379
steps:
- name: Install Crystal
uses: oprypin/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Check out repository code
uses: actions/checkout@v6
- name: Install dependencies
run: shards install --skip-postinstall --skip-executables
- name: Run tests
run: crystal spec