ci: check typescript #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check-backend | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- "**.rs" | |
- "**/Cargo.lock" | |
- "**/Cargo.toml" | |
- ".github/workflows/check-backend.yml" | |
pull_request: | |
paths: | |
- "**.rs" | |
- "**/Cargo.lock" | |
- "**/Cargo.toml" | |
- ".github/workflows/check-backend.yml" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install dependencies (ubuntu only) | |
uses: awalsh128/cache-apt-pkgs-action@v1 | |
with: | |
packages: libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf | |
version: 1.0 | |
- name: install frontend dependencies | |
uses: bahmutov/npm-install@v1 | |
with: | |
working-directory: ./frontend | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- name: cache backend dependencies | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "./backend -> target" | |
- name: run clippy | |
run: cargo clippy | |
working-directory: ./backend | |
env: | |
RUSTFLAGS: "-Dwarnings" | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install Rust stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: run rustfmt | |
run: cargo fmt --all -- --check | |
working-directory: ./backend |