Skip to content

Upgrade crystal version #88

Upgrade crystal version

Upgrade crystal version #88

Workflow file for this run

name: Main
on:
push:
branches:
- master
- develop
pull_request:
types:
- opened
- synchronize
jobs:
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set crystal version environement variable
run: echo "CRYSTAL_VERSION=$(cat .crystal-version)" >> $GITHUB_ENV
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ env.CRYSTAL_VERSION }}
- name: Crystal shard cache
uses: actions/cache@v3
with:
path: lib
key: ${{ runner.os }}-shards-${{ hashFiles('**/shard.lock') }}
- name: Install dependencies
run: shards install
- name: Run ameba
run: crystal lib/ameba/bin/ameba.cr
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set crystal version environement variable
run: echo "CRYSTAL_VERSION=$(cat .crystal-version)" >> $GITHUB_ENV
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ env.CRYSTAL_VERSION }}
- name: Crystal shard cache
uses: actions/cache@v3
with:
path: lib
key: ${{ runner.os }}-${{ matrix.crystal }}-shards-${{ hashFiles('**/shard.lock') }}
- name: Install dependencies
run: shards install --production
- name: Run tests
run: crystal spec