Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

# A newer push to the same PR cancels the run for the older commit.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
# Job names `test (ubuntu-latest)` and `test (macos-latest)` are the
# required status checks in the `main` ruleset; keep them in sync.
test:
name: test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test
run: cargo test --workspace
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ Custom [herdr](https://herdr.dev) plugins, built and linked from one repo.
just # build every plugin and link it with herdr
just test # run all tests
just dev-one command-palette # build + link one plugin
just ci # fmt + clippy + tests, same as the PR gate
```

Pull requests into `main` must pass CI (`.github/workflows/ci.yml`: fmt,
clippy with warnings denied, and tests on Linux and macOS) before merging.

herdr launches plugin commands fresh each time, so after `just` the next
invocation uses the new build. Relinking is safe; it refreshes the manifest.

Expand Down
6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ dev-one name: (build name) (link name)
# Run every test in the cargo workspace.
test:
cargo test --workspace

# Run the same checks as the CI gate on pull requests.
ci:
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
Loading