Skip to content

Commit 3827be1

Browse files
ci: replace hand-maintained feature-soundness scripts with cargo-hack (#4013)
1 parent 19b1869 commit 3827be1

5 files changed

Lines changed: 23 additions & 49 deletions

File tree

.github/workflows/clippy.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,25 @@ jobs:
3838
with:
3939
save-if: ${{ github.ref == 'refs/heads/master' }}
4040

41+
- uses: taiki-e/install-action@cargo-hack
42+
4143
- name: Lint feature soundness
4244
if: matrix.profile == 'dev'
43-
run: bash ./ci/feature-soundness.sh
45+
run: >-
46+
cargo hack clippy
47+
-p yew -p yew-agent -p yew-router
48+
--feature-powerset --no-dev-deps
49+
--keep-going
50+
-- -D warnings
4451
4552
- name: Lint feature soundness
4653
if: matrix.profile == 'release'
47-
run: bash ./ci/feature-soundness-release.sh
54+
run: >-
55+
cargo hack clippy
56+
-p yew -p yew-agent -p yew-router
57+
--feature-powerset --no-dev-deps
58+
--keep-going --release
59+
-- -D warnings
4860
4961
clippy:
5062
name: Clippy Workspace

Makefile.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# * doc-test
1111
# * website-test
1212
#
13-
# packages/yew also contains `clippy-feature-soundness` to ensure everything is fine
13+
# packages/yew also contains `clippy-feature-soundness` (requires cargo-hack)
1414
# Run `cargo make --list-all-steps` for more details.
1515
#
1616
######################

ci/feature-soundness-release.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

ci/feature-soundness.sh

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/yew/Makefile.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ args = ["test", "--all-targets", "--all-features"]
2222
dependencies = ["native-test", "wasm-test"]
2323

2424
[tasks.clippy-feature-soundness]
25-
script = '''
26-
#!/usr/bin/env bash
27-
set -ex
28-
bash ../../ci/feature-soundness.sh
29-
bash ../../ci/feature-soundness-release.sh
30-
'''
25+
command = "cargo"
26+
args = [
27+
"hack", "clippy",
28+
"-p", "yew", "-p", "yew-agent", "-p", "yew-router",
29+
"--feature-powerset", "--no-dev-deps",
30+
"--keep-going",
31+
"--", "-D", "warnings",
32+
]

0 commit comments

Comments
 (0)