Implement ChainID (#45) #117
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: CCIP2ETH Test | |
on: [workflow_dispatch, push] | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
check: | |
strategy: | |
fail-fast: true | |
name: CCIP2.ETH Resolver Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Run Forge build | |
run: | | |
forge install foundry-rs/forge-std --no-commit --no-git | |
forge build --sizes | |
id: build | |
- name: Run Forge tests | |
run: | | |
forge test --fork-url https://rpc.ankr.com/eth_goerli -vvvv --fork-block-number 8897000 | |
id: test | |
- name: Initialise status badge | |
if: github.ref == 'refs/heads/main' | |
run: cp .github/init.svg .github/badge.svg | |
- name: Set name of badge | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "checks" | |
replace: "Status" | |
include: ".github/badge.svg" | |
regex: false | |
- name: Capitalise test status | |
run: | | |
echo "STATUS=$(echo "${{ steps.test.outcome }}" | sed 's/\b./\U&/')" >> ${GITHUB_ENV} | |
- name: Set status of Forge tests | |
if: github.ref == 'refs/heads/main' | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "status" | |
replace: "${{ env.STATUS }}" | |
#replace: ${{ (steps.test.outcome == 'success' && 'Ser! 🥳') || 'Ser? ❌' }} | |
include: ".github/badge.svg" | |
regex: false | |
- name: Set color of outcome | |
if: github.ref == 'refs/heads/main' && steps.test.outcome == 'failure' | |
uses: jacobtomlinson/gha-find-replace@v3 | |
with: | |
find: "3C1" | |
replace: "F73" | |
include: ".github/badge.svg" | |
regex: false | |
- name: Commit changes to .github/badge.svg | |
if: github.ref == 'refs/heads/main' | |
uses: EndBug/add-and-commit@v8 | |
with: | |
author_name: sshmatrix | |
author_email: [email protected] | |
message: auto-commit; render badge.svg | |
add: '.github/badge.svg' | |
- name: Push changes to .github/badge.svg | |
if: github.ref == 'refs/heads/main' | |
uses: ad-m/[email protected] | |
with: | |
branch: main | |
force: true | |
github_token: ${{ secrets.TOKEN }} |