Lint plugin in CI

This commit is contained in:
Andras Schmelczer 2025-01-02 15:43:07 +00:00
parent 111f14cec1
commit 08da52cce8
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

45
.github/workflows/check.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Rust
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup
run: |
rustup install nightly
rustup default nightly
rustup component add clippy rustfmt
cargo install sqlx-cli
cd backend
sqlx database create --database-url sqlite://db.sqlite3
sqlx migrate run --source sync_server/src/database/migrations --database-url sqlite://db.sqlite3
- name: Lint backend
run: |
cd backend
cargo clippy --all-targets --all-features
cargo fmt --all -- --check
- name: Test backend
run: |
cd backend
cargo test --verbose
- name: Lint frontend
run: |
cd plugin
npm install
npm run lint