This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
Merge pull request #929 from kachick/bump-devenv #230
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI - Crystal | |
on: | |
push: | |
branches: [main] | |
paths: | |
- '.github/workflows/ci-crystal.yml' | |
- '**/*.cr' | |
- '**/*.ecr' | |
- 'shard.yml' | |
- 'shard.lock' | |
- '.tool-versions' | |
pull_request: | |
paths: | |
- '.github/workflows/ci-crystal.yml' | |
- '**/*.cr' | |
- '**/*.ecr' | |
- 'shard.yml' | |
- 'shard.lock' | |
- '.tool-versions' | |
jobs: | |
spec: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: '1.8.1' | |
# Need node.js to install validator. Spec includes the validator runner | |
- run: crystal spec --tag '~needs_npm' | |
lint: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache ameba | |
id: cache | |
uses: actions/cache@v3 | |
with: | |
path: ./bin/ameba | |
key: ameba-${{ runner.os }}-crystal_1.8.1-${{ hashFiles('shard.lock') }} | |
- uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: '1.8.1' | |
- run: shards install | |
if: steps.cache.outputs.cache-hit != 'true' | |
- run: make crystal-lint-check |