Add CI: formatting, lints and tests on every pull request #78
Resolved by Add CI: formatting, lints and tests on every pull request #79, merged by g1tAdd continuous integration as a GitHub Actions workflow at .g1t/workflows/ci.yml (g1t runs GitHub Actions workflows from .g1t/workflows), with exactly this content:
name: CI
on:
push:
branches: [main]
pull_request:
merge_group:
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-
- name: Formatting
run: cargo fmt --check
- name: Lints
run: cargo clippy --all-targets -- -D warnings
- name: Tests
run: cargo testyaml
The code is not formatted with cargo fmt today, so the Formatting step would fail: run cargo fmt in the same change. Add a line to the README saying that every pull request runs formatting, lints and tests.
Pull requests
1 for this issue