Skip to content

Commit

Permalink
Refactor GitHub Actions CI workflow (#26)
Browse files Browse the repository at this point in the history
* Refactor GitHub Actions CI workflow

* Test against Crystal 0.36.1
  • Loading branch information
Sija authored Apr 9, 2021
1 parent 8f11676 commit 4235849
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 44 deletions.
74 changes: 31 additions & 43 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,45 @@
name: ExceptionPage CI
name: CI

on:
pull_request:
push:
branches: [master]
pull_request:
branches: "*"
schedule:
- cron: "0 3 * * 1" # Every monday at 3 AM

jobs:
check_format:
test:
strategy:
fail-fast: false
matrix:
crystal_version:
- 0.36.1
- 1.0.0
experimental:
- false
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
container: crystallang/crystal:${{ matrix.crystal_version }}
steps:
- uses: actions/[email protected]
- name: Install shards
run: shards install
- name: Format
run: crystal tool format --check
- name: Lint
run: ./bin/ameba
os: [ubuntu-latest]
crystal: [0.36.1, latest, nightly]
runs-on: ${{ matrix.os }}

specs:
strategy:
fail-fast: false
matrix:
crystal_version:
- 0.36.1
- 1.0.0
experimental:
- false
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
container: crystallang/crystal:${{ matrix.crystal_version }}
steps:
- uses: actions/[email protected]
- name: Install Chromedriver
run: |
apt-get update
apt-get -yqq install chromium-chromedriver
- name: Cache Crystal
uses: actions/[email protected]
- name: Install Crystal
uses: oprypin/install-crystal@v1
with:
path: ~/.cache/crystal
key: ${{ runner.os }}-crystal
- name: Install shards
crystal: ${{ matrix.crystal }}

- name: Install ChromeDriver
run: |
sudo apt-get update
sudo apt-get -yqq install chromium-chromedriver
- name: Download source
uses: actions/checkout@v2

- name: Install dependencies
run: shards install
- name: Run tests
env:
SHARDS_OPTS: --ignore-crystal-version

- name: Run specs
run: crystal spec

- name: Check formatting
run: crystal tool format --check

- name: Run ameba linter
run: bin/ameba
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Exception Page
# Exception Page [![CI](https://github.com/crystal-loot/exception_page/actions/workflows/ci.yml/badge.svg)](https://github.com/crystal-loot/exception_page/actions/workflows/ci.yml)

A library for displaying exceptional exception pages for easier debugging.

Expand Down

0 comments on commit 4235849

Please sign in to comment.