add check step
Some checks failed
Backend Actions / check (push) Failing after 1m24s
Backend Actions / build (push) Successful in 2m59s
Backend Actions / test (push) Failing after 3m14s

This commit is contained in:
2025-07-22 00:23:06 +01:00
parent f2c4c15da1
commit 5fe2d7ba79
3 changed files with 28 additions and 6 deletions

View File

@ -3,6 +3,25 @@ run-name: ${{ gitea.actor }} is running backend actions
on: [push]
jobs:
check:
runs-on: rust-latest
defaults:
run:
working-directory: ./backend
steps:
- uses: actions/checkout@v4
- name: Load Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
backend/target
key: ${{ runner.os }}-cargo-check-${{ hashFiles('backend/Cargo.lock') }}
- name: Run Clippy
run: cargo clippy --no-deps -- -Dwarnings -Dclippy::correctness -Wclippy::pedantic -Wclippy::perf -Aclippy::missing_errors_doc -Aclippy::missing_panics_doc
build:
runs-on: rust-latest
defaults:
@ -16,8 +35,8 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('Cargo.lock') }}
backend/target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('backend/Cargo.lock') }}
- name: Build Release Binary
run: cargo build --release --locked
@ -34,8 +53,10 @@ jobs:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('Cargo.lock') }}
backend/target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('backend/Cargo.lock') }}
- name: Build Binary with Shutdown
run: cargo build --features shutdown --bin nuchat
- name: Build Test Binary
run: cargo test --no-run
- name: Run Tests
@ -44,4 +65,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: nuchat-${{ hashFiles('src/**') }}-${{ hashFiles('tests/**') }}.log
path: logs/*
path: backend/logs/*