2022-07-11 17:06:05 +08:00
|
|
|
name: Check backend
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
2022-07-19 17:37:38 +08:00
|
|
|
- '.github/workflows/backend-checks.yml'
|
|
|
|
- 'src-tauri/**'
|
2022-07-11 17:06:05 +08:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2022-07-19 17:37:38 +08:00
|
|
|
- '.github/workflows/backend-checks.yml'
|
|
|
|
- 'src-tauri/**'
|
2022-07-11 17:06:05 +08:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.ref }}-${{ github.workflow }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
2022-07-11 17:42:03 +08:00
|
|
|
rustfmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --manifest-path ./src-tauri/Cargo.toml --all -- --check
|
|
|
|
|
2022-07-11 17:06:05 +08:00
|
|
|
clippy:
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2024-10-31 06:06:57 +08:00
|
|
|
platform: [windows-latest, ubuntu-latest]
|
2022-07-11 17:06:05 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install Linux dependencies
|
|
|
|
if: matrix.platform == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libwebkit2gtk-4.0-dev \
|
|
|
|
build-essential \
|
|
|
|
curl \
|
|
|
|
wget \
|
|
|
|
libssl-dev \
|
|
|
|
libgtk-3-dev \
|
|
|
|
libayatana-appindicator3-dev \
|
|
|
|
librsvg2-dev
|
|
|
|
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
with:
|
|
|
|
working-directory: src-tauri
|
|
|
|
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
name: clippy (${{ runner.os }})
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
args: --manifest-path ./src-tauri/Cargo.toml --no-default-features -- -D warnings
|