summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2024-11-07 13:14:36 +0000
committerGitHub <noreply@github.com>2024-11-07 13:14:36 +0000
commit792d0d5f6df912039a58768e6ff503ae00abe7c0 (patch)
treef697072ba7ea2aaf0a8ca970bd2767c6389e88db /.github/workflows
parentac6e796c732bb4be5a0fe6be9ba53ad49c49bd51 (diff)
downloadinvidious-792d0d5f6df912039a58768e6ff503ae00abe7c0.tar.gz
invidious-792d0d5f6df912039a58768e6ff503ae00abe7c0.tar.bz2
invidious-792d0d5f6df912039a58768e6ff503ae00abe7c0.zip
CI: Check Crystal lint only on latest version (#5042)
* CI: Check Crystal lint only on latest version * Apply suggestion from code review Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com> --------- Co-authored-by: syeopite <70992037+syeopite@users.noreply.github.com>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml33
1 files changed, 21 insertions, 12 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 411ec769..dd472d1a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -54,7 +54,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 +65,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 +79,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,8 +124,12 @@ 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:
@@ -151,7 +149,18 @@ jobs:
key: shards-${{ hashFiles('shard.lock') }}
- 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