-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,16 @@ on: | |
- "release/*" | ||
- "feature/*" | ||
- "features/*" | ||
- "implement-feature/**" | ||
- "implement-feature/**/**" | ||
pull_request: | ||
branches: | ||
- mainnet | ||
- testnet | ||
- "release/*" | ||
- "feature/*" | ||
- "features/*" | ||
- "feature/ci" | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
|
@@ -30,7 +33,7 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
|
@@ -48,10 +51,41 @@ jobs: | |
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build | ||
forge build --skip scripts | ||
id: build | ||
|
||
- name: Run Forge tests | ||
# - name: Run Forge tests | ||
# run: | | ||
# forge test --no-match-path '*forking/*' -vvv | ||
# # id: test | ||
|
||
- name: "Setup Node" | ||
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 #v3.4.1 | ||
with: | ||
node-version: v16.16.0 | ||
|
||
- name: Storage Layout Check | ||
run: | | ||
echo "Checking storage layout..." | ||
echo "Current branch: ${{ github.head_ref || github.ref_name }}" | ||
echo "BASE_BRANCH: ${{ github.event.pull_request.base.ref }}" | ||
echo "CURRENT_COMMIT_HASH: ${{ github.sha }}" | ||
git fetch --unshallow || git fetch --all | ||
dependencies/@storage-delta-0.3.1/run.sh ${{ github.event.pull_request.base.sha }} --omit new --contracts contracts | ||
- name: Check for storage_delta folder | ||
if: github.event_name == 'pull_request' | ||
id: check-folder | ||
run: | | ||
if [ -d "storage_delta" ]; then | ||
echo "storage_delta_exists=true" >> $GITHUB_OUTPUT | ||
fi | ||
- name: Commit and changes | ||
if: steps.check-folder.outputs.storage_delta_exists == 'true' | ||
run: | | ||
forge test --no-match-path '*forking/*' -vvv | ||
id: test | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add storage_delta | ||
git commit -m "Add contract layout changes [CI]" | ||
git push origin HEAD:${{ github.head_ref || github.ref_name }} |
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
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
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
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
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