shard-ameba/.github/workflows/ci.yml

47 lines
971 B
YAML
Raw Normal View History

name: CI
on:
push:
2023-01-02 17:41:46 +00:00
branches: [master]
pull_request:
2023-01-02 17:41:46 +00:00
types: [opened, synchronize, reopened]
schedule:
- cron: "0 3 * * 1" # Every monday at 3 AM
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
crystal: [latest, nightly]
runs-on: ${{ matrix.os }}
steps:
2023-11-06 14:02:54 +00:00
- name: Set timezone to UTC
uses: szenius/set-timezone@v1.2
- name: Install Crystal
2022-12-21 15:08:16 +00:00
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Download source
uses: actions/checkout@v4
- name: Install dependencies
run: shards install
2023-11-08 01:20:03 +00:00
- name: Install typos-cli
if: matrix.os == 'macos-latest'
run: brew install typos-cli
- name: Run specs
run: crystal spec
- name: Build ameba binary
run: shards build -Dpreview_mt
- name: Run ameba linter
run: bin/ameba