chore: check diamond contract storage changes on pr #3
Workflow file for this run
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 diamond storage | |
on: | |
push: | |
branches: | |
- development | |
pull_request: | |
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: | | |
echo src/dollar/upgradeInitializers/DiamondInit.sol:DiamondInit >> contracts.txt | |
forge tree | grep -E '^src/dollar/facets' | cut -d' ' -f1 | xargs basename -s | cut -d'.' -f1 | xargs -I{} echo src/dollar/facets/{}.sol:{} >> contracts.txt | |
forge tree | grep -E '^src/dollar/libraries/Lib' | cut -d' ' -f1 | xargs basename -s | cut -d'.' -f1 | xargs -I{} echo src/dollar/libraries/{}.sol:{} >> contracts.txt | |
echo "::set-output name=matrix::$(cat contracts.txt | jq -R -s -c 'split("\n")[:-1]')" | |
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: gitcoindev/foundry-storage-check@main | |
with: | |
workingDirectory: packages/contracts | |
contract: ${{ matrix.contract }} |