-
Notifications
You must be signed in to change notification settings - Fork 61
39 lines (36 loc) · 1.13 KB
/
workspace-hack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Workspace hack
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
# Check https://docs.rs/cargo-hakari/0.9.29/cargo_hakari/#installation
# to learn how to install cargo-hakari locally
- name: Install cargo-hakari
uses: taiki-e/install-action@v2
with:
tool: cargo-hakari
- name: Verify workspace-hack
run: |
cd libs
# If the hack crate has been disabled (probably for a release)
# we don't check anything else
if ! cargo hakari disable --diff ; then
# Check that px_workspace_hack's Cargo.toml is up-to-date
# If this fails, run `cargo hakari generate` to fix it
cargo hakari generate --diff
# Check that all workspace crates depend on px_workspace_hack
# If this fails, run `cargo hakari manage-deps` to fix it
cargo hakari manage-deps --dry-run
fi