diff --git a/.forgejo/workflows/check.yaml b/.forgejo/workflows/check.yaml new file mode 100644 index 0000000..03f5e32 --- /dev/null +++ b/.forgejo/workflows/check.yaml @@ -0,0 +1,23 @@ +on: [push] +jobs: + print-content: + runs-on: docker + container: + image: rust:slim + steps: + - name: install action dependencies + run: apt install --no-install-recommends --update -y nodejs + - name: setup toolchain + run: rustup component add rustfmt clippy + - name: checkout code + uses: actions/checkout@v6 + - name: install dependencies + run: cargo install --path . + - name: cargo check + run: cargo check --all-targets + - name: format + run: cargo fmt -- --check + - name: lint + run: cargo clippy -- -Dwarnings + - name: test + run: cargo test diff --git a/.justfile b/.justfile index e6d95d8..871c43b 100644 --- a/.justfile +++ b/.justfile @@ -74,10 +74,17 @@ alias rb := release-build # Lint, check formatting and run tests [group('checks')] -check: lint format-check test +check: format-check lint cargo-check test alias c := check +# Run cargo check +[group('checks')] +cargo-check: + cargo check --workspace + +alias cc := cargo-check + # Lint with Clippy [group('checks')] lint: @@ -94,7 +101,7 @@ alias fc := format-check # Run tests [group('checks')] -test: build +test: cargo test alias t := test