Skip to content

Merge branch 'main' of github.com:Zli-UoA/zoo-backend into story/#21 #50

Merge branch 'main' of github.com:Zli-UoA/zoo-backend into story/#21

Merge branch 'main' of github.com:Zli-UoA/zoo-backend into story/#21 #50

Workflow file for this run

name: CI
on:
push:
paths:
- "backend/**"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v4
- name: Restore Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: backend
- name: Build project
run: |
cargo build
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v4
- name: Restore Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: backend
- name: lint check
run: |
cargo clippy
- name: format check
run: |
cargo fmt --check
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend
steps:
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Checkout
uses: actions/checkout@v4
- name: Restore Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: backend
- name: test
run: |
cargo test