-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: add workflow for testing Optimism every night #638
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1cfd82e
ci: add workflow for testing Optimism every night
Wodann dd4cfb6
trigger CI workflow
Wodann c58e797
revert
Wodann 57e883d
Update .github/workflows/test-recent-optimism-block.yml
Wodann 2d3a652
Update .github/workflows/test-recent-optimism-block.yml
Wodann f383dde
fix: ensure that main branch can run action (required for on.schedule)
Wodann 5805442
refactor: remove chain ID override from replay block
Wodann File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Run a recent full Optimism block in the Hardhat Network | ||
|
||
on: | ||
schedule: | ||
- cron: "0 */8 * * *" | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
working-directory: packages/hardhat-core | ||
|
||
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/slack-github-action@v1.18.0 | ||
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 }} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, https://github.com/actions-rs has been archived last year and the actions repos haven't been updated for quite a while. I think it'd be nice to replace them, but maybe best to do it in a separate PR - I could propose it some time this week if you like the idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we use this across all of our GitHub actions, it would be good to do it in a follow-up task.
I created one in our backlog: #642
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a somewhat related note, do we need
actions-rs/cargo
(cargo specifically) at all? It seem to be just runningcargo
and we don't seem to need any cross-compilation or other target specs in general (which could be noisy, I guess), so this might be a regularrun
step, instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 to what @Xanewok said. I already replaced that action with a plain
run
step in some workflow some time ago. It's simpler, it's straightforward to understand what it does, and it means one external dependency less.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Off-topic for this PR though)