-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:vyperlang/titanoboa into 104/refa…
…ctor-pyevm
- Loading branch information
Showing
28 changed files
with
444 additions
and
357 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
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,62 @@ | ||
# These tests are separated into a separate file to be able to use secrets when running in a fork. | ||
# To avoid leaking secrets, we only allow contributors to run the tests. | ||
# Note that pull_request_trigger runs from the base branch, not the head branch. | ||
# So, we need to manually check out the head ref and merge the base branch into it. | ||
name: integration | ||
|
||
on: | ||
pull_request_target: | ||
push: # all | ||
|
||
jobs: | ||
integration: | ||
name: "integration tests (Alchemy: fork mode and Sepolia)" | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
|
||
# given we use the pull_request_trigger, only allow contributors to run tests with secrets | ||
- name: Check if the user is a contributor | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const { actor: username, repo: { owner, repo } } = context; | ||
const collaborator = await github.rest.repos.getCollaboratorPermissionLevel({ owner, repo, username }); | ||
if (!collaborator.data.user.permissions.push) { | ||
core.setFailed(username + ' is not a contributor'); | ||
} | ||
# this will check out the base branch, not the head branch | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # we need the history to be able to merge | ||
|
||
# now merge the head branch into the base branch, so we can run the tests with the head branch's changes | ||
- name: Merge head branch | ||
run: | | ||
git fetch origin ${{ github.head_ref }} | ||
git merge origin/${{ github.head_ref }} --no-edit | ||
- name: Setup Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: "pip" | ||
|
||
- name: Install Requirements | ||
run: | | ||
pip install -r dev-requirements.txt | ||
pip install . | ||
- name: Run Fork Mode Tests | ||
run: pytest -n auto tests/integration/fork/ | ||
env: | ||
MAINNET_ENDPOINT: ${{ secrets.ALCHEMY_MAINNET_ENDPOINT }} | ||
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
|
||
- name: Run Sepolia Tests | ||
# disable xdist, otherwise they can contend for tx nonce | ||
run: pytest -n 0 tests/integration/network/sepolia/ | ||
env: | ||
SEPOLIA_ENDPOINT: ${{ secrets.ALCHEMY_SEPOLIA_ENDPOINT }} | ||
SEPOLIA_PKEY: ${{ secrets.SEPOLIA_PKEY }} |
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.