forked from argumentcomputer/ci-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (42 loc) · 1.49 KB
/
unused-deps.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
40
41
42
43
44
45
46
# Runs unused dependency check for crate consumers.
name: Unused dependency check
on:
# we expect dependents to call this on a nightly basis
# schedule:
# - cron: "0 0 * * *"
workflow_call:
inputs:
# comma-separated list of features to check
features:
required: false
default: ""
type: string
env:
CARGO_TERM_COLOR: always
jobs:
unused-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: lurk-lab/ci-workflows
path: ci-workflows
# udeps requires nightly
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@cargo-udeps
# Normally running cargo-udeps requires use of a nightly compiler
# In order to have a more stable and less noisy experience, lets instead
# opt to use the stable toolchain specified via the 'rust-toolchain' file
# and instead enable nightly features via 'RUSTC_BOOTSTRAP'
- name: run cargo-udeps
run: RUSTC_BOOTSTRAP=1 cargo udeps --lib --features "${{ inputs.features }}"
- uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_URL:
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: ci-workflows/.github/templates/UNUSED_DEPS_ISSUE.md