-
Notifications
You must be signed in to change notification settings - Fork 63
62 lines (54 loc) · 1.79 KB
/
Copy pathcheck-artifacts.yml
File metadata and controls
62 lines (54 loc) · 1.79 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
name: Generated artifacts in sync
# This workflow validates that auto-generated content committed to the repo
# is in sync with its sources:
# - docs/modules/api/ ← forge-doc Asciidoc (consumed by aragon/developer-portal)
# - npm-artifacts/src/abi.ts ← extracted ABIs (shipped via @aragon/osx-artifacts)
#
# If a PR changes a contract but forgets to regenerate either, CI fails with
# a clear message telling the contributor what to run.
on:
push:
branches:
- main
pull_request:
paths:
- 'src/**'
- 'scripts/build-docs.py'
- 'foundry.toml'
- 'remappings.txt'
- 'docs/**'
- 'npm-artifacts/prepare-abi.sh'
jobs:
check:
name: Generated artifacts
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: v1.5.0
- name: Install just
uses: extractions/setup-just@v2
- name: Build docs
run: just build-docs main
- name: Verify docs are committed in sync
run: |
if ! git diff --exit-code -- docs/modules/api/; then
echo "::error::Generated API docs are out of date."
echo "::error::Run \`just build-docs\` locally and commit the diff."
exit 1
fi
- name: Verify ABI is in sync with contracts
run: |
(cd npm-artifacts && just abi)
if ! git diff --exit-code -- npm-artifacts/src/abi.ts; then
echo "::error::npm-artifacts/src/abi.ts is out of date."
echo "::error::Run 'just abi' from npm-artifacts/ locally and commit the diff."
exit 1
fi