Skip to content

CI

CI #77

Workflow file for this run

name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1"
jobs:
build:
name: "crystal: ${{ matrix.crystal }}"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
crystal: [latest]
runs-on: ${{ matrix.os }}
services:
postgres:
image: postgres
env:
POSTGRES_DB: pgorm_spec
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Install shards
run: shards install --ignore-crystal-version
- name: Lint
run: ./bin/ameba
- name: Format
run: crystal tool format --check
- name: Run tests
run: crystal spec -v --error-trace
env:
PG_DATABASE_URL: postgresql://postgres:password@localhost:5432/pgorm_spec