summaryrefslogtreecommitdiffstats
path: root/.github/workflows/ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yml')
-rw-r--r--.github/workflows/ci.yml39
1 files changed, 24 insertions, 15 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 411ec769..5f859613 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,11 +38,10 @@ jobs:
matrix:
stable: [true]
crystal:
- - 1.10.1
- - 1.11.2
- 1.12.1
- 1.13.2
- 1.14.0
+ - 1.15.0
include:
- crystal: nightly
stable: false
@@ -54,7 +53,7 @@ jobs:
- name: Install required APT packages
run: |
- sudo apt install -y libsqlite3-dev
+ sudo apt install -y libsqlite3-dev
shell: bash
- name: Install Crystal
@@ -65,7 +64,9 @@ jobs:
- name: Cache Shards
uses: actions/cache@v3
with:
- path: ./lib
+ path: |
+ ./lib
+ ./bin
key: shards-${{ hashFiles('shard.lock') }}
- name: Install Shards
@@ -77,14 +78,6 @@ jobs:
- 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/invidious.cr
@@ -130,14 +123,19 @@ jobs:
- name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done
- ameba_lint:
+ lint:
+
runs-on: ubuntu-latest
+
+ continue-on-error: true
+
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Crystal
+ id: lint_step_install_crystal
uses: crystal-lang/install-crystal@v1.8.0
with:
crystal: latest
@@ -148,10 +146,21 @@ jobs:
path: |
./lib
./bin
- key: shards-${{ hashFiles('shard.lock') }}
+ key: shards-${{ hashFiles('shard.lock') }}-${{ steps.lint_step_install_crystal.outputs.crystal }}
- name: Install Shards
- run: shards install
+ run: |
+ if ! shards check; then
+ shards install
+ fi
+
+ - name: Check Crystal formatter compliance
+ run: |
+ if ! crystal tool format --check; then
+ crystal tool format
+ git diff
+ exit 1
+ fi
- name: Run Ameba linter
run: bin/ameba