Cultivation/.github/workflows/backend-checks.yml
Thoronium 02a304d830
Remove clippy for macos
Macos not supported, can add back if it ever is.
2024-10-30 16:06:57 -06:00

62 lines
1.4 KiB
YAML

name: Check backend
on:
push:
paths:
- '.github/workflows/backend-checks.yml'
- 'src-tauri/**'
pull_request:
paths:
- '.github/workflows/backend-checks.yml'
- 'src-tauri/**'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
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
clippy:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, ubuntu-latest]
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