Skip to content

Commit

Permalink
fix(ci): Check formatting and run tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanuppal committed Jan 13, 2025
1 parent b41dc9d commit 5c7852a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0

jobs:
build_and_test:
Expand All @@ -19,7 +20,5 @@ jobs:
- uses: actions/checkout@v4
- name: Rust Caching
uses: Swatinem/rust-cache@v2.7.3
- name: Install dependencies
run: make deps
- name: Lint
run: make lint
- name: Test
run: cargo test
9 changes: 6 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
- uses: actions/checkout@v4
- name: Rust Caching
uses: Swatinem/rust-cache@v2.7.3
- name: Install dependencies
run: make deps
- name: Install nightly rustfmt
# https://stegosaurusdormant.com/rustfmt-nightly/
run: rustup toolchain install nightly --allow-downgrade -c rustfmt
- name: Lint
run: make lint
run: cargo clippy --all --all-targets -- --deny warnings
- name: Check formatting
run: cargo +nightly fmt --check
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,3 @@ endif
asm:
cargo build --release
objdump -d target/release/fernjit | less

.PHONY: lint
lint:
cargo clippy

0 comments on commit 5c7852a

Please # to comment.