Skip to content

.github/workflows/ci.yml #37

.github/workflows/ci.yml

.github/workflows/ci.yml #37

Workflow file for this run

on:
push:
branches:
- master
tags:
- "v*.*.*"
schedule:
- cron: "15 3 * * 1" # Every monday at 3:15 AM
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache shards
uses: actions/cache@v2
with:
path: ~/.cache/shards
key: ${{ runner.os }}-shards-${{ hashFiles('shard.yml') }}
restore-keys: ${{ runner.os }}-shards-
- name: Download source
uses: actions/checkout@v2
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Install shards
run: shards check || shards install --without-development
- name: Check formatting
run: crystal tool format --check
- name: Run Ameba
run: bin/ameba --except Metrics/CyclomaticComplexity
- name: Run tests
run: crystal spec --order=random --error-on-warnings
- name: Build docs
run: crystal docs
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs