Add CI workflow

This commit is contained in:
Juno Takano 2025-12-13 21:05:17 -03:00
commit f8186ba396
2 changed files with 32 additions and 2 deletions

View file

@ -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

View file

@ -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