-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3192 from ethereum/dev
release for jan testnets
- Loading branch information
Showing
34 changed files
with
721 additions
and
539 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 |
---|---|---|
@@ -0,0 +1,133 @@ | ||
name: Run spec tests and linter | ||
|
||
defaults: | ||
run: | ||
shell: zsh {0} | ||
|
||
env: | ||
TEST_PRESET_TYPE: "minimal" | ||
DEFAULT_BRANCH: "dev" | ||
|
||
# Run tests on workflow_Dispatch | ||
on: | ||
push: | ||
branches: | ||
- dev | ||
- master | ||
pull_request: | ||
workflow_dispatch: | ||
inputs: | ||
test_preset_type: | ||
default: minimal | ||
description: Type of test to run, either mainnet or minimal | ||
type: string | ||
required: true | ||
commitRef: | ||
description: The branch, tag or SHA to checkout and build from | ||
default: dev | ||
required: true | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
precleanup: | ||
runs-on: self-hosted | ||
if: always() | ||
steps: | ||
- name: 'Cleanup build folder' | ||
run: | | ||
ls -la ./ | ||
rm -rf ./* || true | ||
rm -rf ./.??* || true | ||
ls -la ./ | ||
setup-env: | ||
runs-on: self-hosted | ||
needs: precleanup | ||
steps: | ||
- name: Checkout this repo | ||
uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.event.inputs.commitRef || env.DEFAULT_BRANCH }} | ||
- uses: actions/[email protected] | ||
id: cache-git | ||
with: | ||
path: ./* | ||
key: ${{ github.sha }} | ||
|
||
table_of_contents: | ||
runs-on: self-hosted | ||
needs: setup-env | ||
steps: | ||
- uses: actions/[email protected] | ||
id: restore-build | ||
with: | ||
path: ./* | ||
key: ${{ github.sha }} | ||
- name: Check table of contents | ||
run: sudo npm install -g doctoc@2 && make check_toc | ||
|
||
codespell: | ||
runs-on: self-hosted | ||
needs: setup-env | ||
steps: | ||
- name: Check codespell | ||
run: pip install 'codespell<3.0.0,>=2.0.0' --user && make codespell | ||
|
||
lint: | ||
runs-on: self-hosted | ||
needs: setup-env | ||
steps: | ||
- name: Run linter for pyspec | ||
run: make lint | ||
- name: Run linter for test generators | ||
run: make lint_generators | ||
|
||
pyspec-tests: | ||
runs-on: self-hosted | ||
needs: [setup-env,lint,codespell,table_of_contents] | ||
strategy: | ||
matrix: | ||
version: ["phase0", "altair", "bellatrix", "capella", "eip4844"] | ||
steps: | ||
- uses: actions/[email protected] | ||
id: restore-build | ||
with: | ||
path: ./* | ||
key: ${{ github.sha }} | ||
- name: set TEST_PRESET_TYPE | ||
if: github.event.inputs.test_preset_type != '' | ||
run: | | ||
echo "spec_test_preset_type=${{ github.event.inputs.test_preset_type || env.TEST_PRESET_TYPE }}" >> $GITHUB_ENV | ||
- name: set TEST_PRESET_TYPE | ||
if: ${{ (github.event_name == 'push' && github.ref_name != 'master') || github.event_name == 'pull_request' }} | ||
run: | | ||
echo "spec_test_preset_type=${{ env.TEST_PRESET_TYPE}}" >> $GITHUB_ENV | ||
- name: set TEST_PRESET_TYPE | ||
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }} | ||
run: | | ||
echo "spec_test_preset_type=mainnet" >> $GITHUB_ENV | ||
- name: set TEST_PRESET_TYPE | ||
if: github.event.schedule=='0 0 * * *' | ||
run: | | ||
echo "spec_test_preset_type=mainnet" >> $GITHUB_ENV | ||
- name: Install pyspec requirements | ||
run: make install_test | ||
- name: test-${{ matrix.version }} | ||
run: make citest fork=${{ matrix.version }} TEST_PRESET_TYPE=${{env.spec_test_preset_type}} | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: test-${{ matrix.version }} | ||
path: tests/core/pyspec/test-reports | ||
|
||
cleanup: | ||
runs-on: self-hosted | ||
needs: [setup-env,pyspec-tests,codespell,lint,table_of_contents] | ||
if: always() | ||
steps: | ||
- name: 'Cleanup build folder' | ||
run: | | ||
ls -la ./ | ||
rm -rf ./* || true | ||
rm -rf ./.??* || true | ||
ls -la ./ |
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.