forked from stacks-network/stacks-core
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.15 KB
/
constants-check.yml
File metadata and controls
41 lines (34 loc) · 1.15 KB
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
name: Constants Check
# Only run when:
# - PRs are (re)opened against develop branch
on:
workflow_call:
jobs:
check-consts:
name: Check the constants from stacks-inspect
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout the latest code
id: git_checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Define Rust Toolchain
id: define_rust_toolchain
run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV
- name: Setup Rust Toolchain
id: setup_rust_toolchain
uses: actions-rust-lang/setup-rust-toolchain@11df97af8e8102fd60b60a77dfbf58d40cd843b8 # v1.10.1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
cache: false
- name: Dump constants JSON
id: consts-dump
run: |
cargo run --bin stacks-inspect -- dump-consts | tee out.json
## output any diff to the github job summary
- name: Compare expected constants JSON
id: expects-json
run: |
diff out.json ./sample/expected_consts.json >> $GITHUB_STEP_SUMMARY