Skip to content

Commit

Permalink
ci: add workflow for testing Optimism every night (#649)
Browse files Browse the repository at this point in the history
This workflow needs to be added to main as the
schedule trigger only works on the default branch.
  • Loading branch information
Wodann authored Sep 12, 2024
1 parent 7080c8d commit 2e5ff9d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/test-recent-mainnet-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
- cron: "0 */8 * * *"
workflow_dispatch:

defaults:
run:
working-directory: packages/hardhat-core

jobs:
test-recent-mainnet-block:
name: Test recent mainnet block
Expand All @@ -26,8 +22,6 @@ jobs:

- name: Run test
uses: actions-rs/cargo@v1
env:
RUSTFLAGS: ${{ matrix.RUSTFLAGS }}
with:
command: replay-block
args: -u ${{ secrets.ALCHEMY_URL }} -c 1
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-recent-optimism-block.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Run a recent full Optimism block in the Hardhat Network

on:
schedule:
- cron: "0 */8 * * *"
workflow_dispatch:

jobs:
test-recent-optimism-block:
name: Test recent Optimism block
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: feat/multichain

- name: Install Rust (stable)
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true

- uses: Swatinem/rust-cache@v2

- name: Cache EDR RPC cache
uses: actions/cache@v4
with:
path: |
**/edr-cache
key: test-recent-optimism-block-rpc-cache-v1

- name: Run test
uses: actions-rs/cargo@v1
with:
command: replay-block
args: -u ${{ secrets.ALCHEMY_URL }} -c optimism

- name: Notify failures
if: failure()
uses: slackapi/[email protected]
with:
payload: |
{
"workflow_name": "${{ github.workflow }}",
"run_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.GH_ACTION_NOTIFICATIONS_SLACK_WEBHOOK_URL }}

0 comments on commit 2e5ff9d

Please sign in to comment.