-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathgateway-contracts-integrity-checks.yml
More file actions
77 lines (66 loc) · 2.48 KB
/
gateway-contracts-integrity-checks.yml
File metadata and controls
77 lines (66 loc) · 2.48 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
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
# This workflow verifies that:
# - The Rust bindings crate version and files are up-to-date
# - Contract mocks and selectors are current
# - Dependency licenses compliance
name: gateway-contracts-integrity-checks
on:
pull_request:
permissions: {}
concurrency:
group: contract-integrity-checks-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check-changes:
name: gateway-contracts-integrity-checks/check-changes
permissions:
contents: 'read' # Required to checkout repository code
runs-on: ubuntu-latest
outputs:
changes-gw-contracts: ${{ steps.filter.outputs.gw-contracts }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
gw-contracts:
- .github/workflows/gateway-contracts-integrity-checks.yml
- gateway-contracts/**
contract-integrity-checks:
name: gateway-contracts-integrity-checks/contract-integrity-checks (bpr)
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-gw-contracts == 'true' }}
permissions:
contents: 'read' # Required to checkout repository code
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: 'false'
- name: Cache npm
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@de808b1eea699e761c404bda44ba8f21aba30b2c # v1.3.1
with:
version: v1.3.1
- name: Install dependencies
working-directory: gateway-contracts
run: npm ci
- name: Check bindings are up-to-date
working-directory: gateway-contracts
run: make check-bindings
- name: Check contract selectors are up-to-date
working-directory: gateway-contracts
run: make check-selectors
- name: Check mock contracts are up-to-date
working-directory: gateway-contracts
run: make check-mocks
- name: Check licenses compliance
working-directory: gateway-contracts
run: make check-licenses