mirror of
https://gitea.invidious.io/iv-org/lsquic.cr
synced 2024-08-15 00:43:31 +00:00
Add CI workflow
This commit is contained in:
parent
3aab3dd7f1
commit
4ba1a4a4dd
1 changed files with 48 additions and 0 deletions
48
.github/workflows/ci.yml
vendored
Normal file
48
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: lsquic.cr CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
pull_request:
|
||||||
|
branches: "*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install Crystal
|
||||||
|
uses: oprypin/install-crystal@v1.2.4
|
||||||
|
with:
|
||||||
|
crystal: 1.0.0
|
||||||
|
|
||||||
|
- name: Cache Shards
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ./lib
|
||||||
|
key: shards-${{ hashFiles('shard.lock') }}
|
||||||
|
|
||||||
|
- name: Install Shards
|
||||||
|
run: |
|
||||||
|
if ! shards check; then
|
||||||
|
shards install
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: crystal spec
|
||||||
|
|
||||||
|
- name: Run lint
|
||||||
|
run: |
|
||||||
|
if ! crystal tool format --check; then
|
||||||
|
crystal tool format
|
||||||
|
git diff
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: crystal build --warnings all --error-on-warnings --error-trace src/lsquic.cr
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue