-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a check CI step to be run on PRs
- Loading branch information
Showing
2 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: { } | ||
merge_group: | ||
types: | ||
- checks_requested | ||
permissions: | ||
contents: read | ||
jobs: | ||
build: | ||
name: Build and check database and frontend | ||
runs-on: "ubuntu-latest" | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 | ||
with: | ||
persist-credentials: false | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'npm' | ||
cache-dependency-path: 'frontend/package-lock.json' | ||
- name: Install npm dependencies | ||
run: npm ci | ||
working-directory: frontend | ||
- name: Install rust toolchain | ||
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17 | ||
with: | ||
toolchain: "stable" | ||
- name: Rust cache | ||
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 | ||
with: | ||
shared-key: "check" | ||
- name: Clippy | ||
run: cargo clippy --locked --all-targets --all-features --workspace # TODO -- -Dwarnings | ||
- name: Test rust | ||
run: cargo test --locked | ||
- name: Download db-dump | ||
run: wget --no-verbose https://static.crates.io/db-dump.tar.gz | ||
- name: Build database | ||
run: cargo run --locked --release --bin read-driver-db | ||
- name: Copy generated database to frontend | ||
run: cp full-crate-db.json frontend/src/ | ||
- name: Check frontend | ||
run: npm run check || echo "TODO" | ||
working-directory: frontend | ||
- name: Build frontend | ||
run: npm run build | ||
working-directory: frontend |
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