ci: add test task on github #2
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
# This CI job installs Crystal and shard dependencies, then executes `crystal spec` to run the test suite | |
# More configuration options are available at https://crystal-lang.github.io/install-crystal/configurator.html | |
name: Exec Lib | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
- dev | |
concurrency: | |
group: ${{ github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
crystal: | |
- "1.0.0" | |
- latest | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download source | |
uses: actions/checkout@v4 | |
- name: Install Crystal | |
uses: crystal-lang/install-crystal@v1 | |
with: | |
crystal: ${{ matrix.crystal }} | |
- name: Install shards | |
run: shards update --ignore-crystal-version | |
- name: Check formatting | |
run: crystal tool format --check | |
- name: Run tests | |
run: crystal spec --order=random |