docs: auto generate NATSPEC docs #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check For Diamond Storage Changes | |
on: | |
push: | |
branches: | |
- development | |
paths: | |
- '**.sol' | |
pull_request: | |
paths: | |
- '**.sol' | |
jobs: | |
provide_contracts: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: onbjerg/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- id: set-matrix | |
working-directory: packages/contracts | |
run: | | |
forge tree | grep -E '^src/dollar/libraries/Lib' | cut -d' ' -f1 | xargs basename -a | cut -d'.' -f1 | xargs -I{} echo src/dollar/libraries/{}.sol:{} >> contracts.txt | |
echo "matrix=$(cat contracts.txt | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
check_storage_layout: | |
needs: provide_contracts | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
contract: ${{ fromJSON(needs.provide_contracts.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: onbjerg/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Check For Diamond Storage Changes | |
uses: ubiquity/foundry-storage-check@main | |
with: | |
workingDirectory: packages/contracts | |
contract: ${{ matrix.contract }} | |
failOnRemoval: true | |
failOnLabelDiff: true |