29 lines
786 B
YAML
29 lines
786 B
YAML
name: Backend Actions
|
|
run-name: ${{ gitea.actor }} is running backend actions
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: rust-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Load Cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
backend/target
|
|
key: ${{ runner.os }}-cargo--${{ hashFiles('Cargo.lock') }}
|
|
- name: Build Binary
|
|
workdir: ./backend
|
|
run: cargo build --release
|
|
- name: Run Tests
|
|
workdir: ./backend
|
|
run: ./scripts/test.sh
|
|
- name: Upload Test Logs
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: nuchat-${{ hashFiles('src/**') }}-${{ hashFiles('tests/**') }}.log
|
|
path: backend/logs/*
|