forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (77 loc) · 2.78 KB
/
sanity.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Runs a series of sanity checks for crate consumers.
#
# Currently the only check is that the version constraints in each `Cargo.toml` do not lead to a breaking dependency.
on:
workflow_dispatch: {}
# Once per day at 00:00 UTC
schedule:
- cron: '0 0 * * *'
env:
RUSTFLAGS: -D warnings
CARGO_TERM_COLOR: always
GETH_BUILD: 1.12.0-e501b3b0
name: sanity
jobs:
dep-version-constraints:
runs-on: ubuntu-20.04
name: dep version constraints test (partition ${{ matrix.partition }}/${{ strategy.job-total }})
strategy:
matrix:
partition: [1, 2, 3]
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install geth
run: |
mkdir -p "$HOME/bin"
wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_BUILD.tar.gz
tar -xvf geth-linux-amd64-$GETH_BUILD.tar.gz
mv geth-linux-amd64-$GETH_BUILD/geth $HOME/bin/geth
chmod u+x "$HOME/bin/geth"
export PATH=$HOME/bin:$PATH
echo $HOME/bin >> $GITHUB_PATH
geth version
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Update packages
run: cargo update
- name: Run tests
run: |
cargo nextest run --locked --workspace --all-features \
--partition hash:${{ matrix.partition }}/${{ strategy.job-total }} \
-E 'kind(lib)' -E 'kind(bin)' -E 'kind(proc-macro)'
- 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: .github/SANITY_DEPS_ISSUE_TEMPLATE.md
unused-deps:
runs-on: ubuntu-20.04
name: unused dependencies
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-udeps
run: cargo install cargo-udeps --locked
- name: Check for unused dependencies
run: cargo +nightly udeps --all-features --all-targets
- 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: .github/SANITY_UNUSED_DEPS_ISSUE_TEMPLATE.md