-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: workflow to check formatting, clippy and, tests
- Loading branch information
1 parent
7f3f6c7
commit bf67f7b
Showing
1 changed file
with
37 additions
and
0 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,37 @@ | ||
name: Tests and Formatting | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
everything: | ||
name: Rust/JS Checks/Formatting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Run cargo fmt | ||
id: fmt | ||
run: cargo fmt --all -- --check | ||
continue-on-error: true | ||
- name: Run cargo clippy | ||
id: clippy | ||
continue-on-error: true | ||
run: cargo clippy --all -- -D warnings | ||
- name: Run cargo test | ||
id: test | ||
continue-on-error: true | ||
run: cargo test | ||
- name: Check if code is properly formatted | ||
if: steps.fmt.outcome != 'success' | ||
run: exit 1 | ||
- name: Check if clippy is happy | ||
if: steps.clippy.outcome != 'success' | ||
run: exit 1 | ||
- name: Check if test succeeded | ||
if: steps.test.outcome != 'success' | ||
run: exit 1 |