Lint plugin in CI
This commit is contained in:
parent
111f14cec1
commit
08da52cce8
1 changed files with 8 additions and 2 deletions
45
.github/workflows/check.yml
vendored
Normal file
45
.github/workflows/check.yml
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue