Skip to content
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

Assertoor #6935

Merged
merged 47 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a34c58c
Add assertoor to ci/cd
kamilchodola Apr 19, 2024
f8e3ad6
Rename main.yml to test-assertoor.yml
kamilchodola Apr 19, 2024
58219d1
Fix name
kamilchodola Apr 19, 2024
af4a431
add config
kamilchodola Apr 19, 2024
4f19b6c
Adjustments
kamilchodola Apr 19, 2024
3d4c2bc
Fix file extension
kamilchodola Apr 19, 2024
147abb5
Trigger
kamilchodola Jul 24, 2024
dff89c7
Change to githubaction
kamilchodola Aug 5, 2024
c2901e2
Remove not needed outputs
kamilchodola Aug 5, 2024
8a899df
Create assertor.yaml
kamilchodola Aug 5, 2024
6c9347b
Update test-assertoor.yml
kamilchodola Aug 5, 2024
d54980d
move dir
kamilchodola Aug 5, 2024
0fe3b17
Add package URL
kamilchodola Aug 5, 2024
8e188de
Flexible assertor execution
kamilchodola Aug 12, 2024
413823a
Docker image placeholders
kamilchodola Aug 12, 2024
b3b9490
Fix whitespace
kamilchodola Aug 12, 2024
c1f8839
Fix whitespace v2
kamilchodola Aug 12, 2024
64df1be
Update assertor.yaml
kamilchodola Aug 13, 2024
83b3eaa
Update assertor.yaml
kamilchodola Aug 13, 2024
9a8d950
Apply assertoor params
kamilchodola Aug 13, 2024
b6b5ef0
Update test-assertoor.yml
kamilchodola Aug 13, 2024
4966eee
Update test-assertoor.yml
kamilchodola Aug 13, 2024
b3991e5
Update test-assertoor.yml
kamilchodola Aug 13, 2024
347f658
Update test-assertoor.yml
kamilchodola Aug 13, 2024
762f156
Update test-assertoor.yml
kamilchodola Aug 13, 2024
2918e10
Update test-assertoor.yml
kamilchodola Aug 13, 2024
3311d25
Update test-assertoor.yml
kamilchodola Aug 13, 2024
5bbee05
Update test-assertoor.yml
kamilchodola Aug 13, 2024
53a7db2
Update test-assertoor.yml
kamilchodola Aug 13, 2024
c325529
Update test-assertoor.yml
kamilchodola Aug 13, 2024
099ab0e
Update test-assertoor.yml
kamilchodola Aug 13, 2024
deb63fe
Update test-assertoor.yml
kamilchodola Aug 13, 2024
fd2510e
Update test-assertoor.yml
kamilchodola Aug 13, 2024
1680de4
Update assertor.yaml
kamilchodola Aug 13, 2024
e6ecc88
Update assertor.yaml
kamilchodola Aug 13, 2024
7a0ab23
Update assertor.yaml
kamilchodola Aug 13, 2024
14db591
Update assertor.yaml
kamilchodola Aug 13, 2024
6878c26
Update assertor.yaml
kamilchodola Aug 13, 2024
d8c9165
Update assertor.yaml
kamilchodola Aug 13, 2024
96ac47c
Update assertor.yaml
kamilchodola Aug 13, 2024
9a6d891
Update test-assertoor.yml
kamilchodola Aug 14, 2024
06b451f
Update assertor.yaml
kamilchodola Aug 14, 2024
9152ddc
Update assertor.yaml
kamilchodola Aug 14, 2024
6ef9d77
Delete .github/configs/assertoor-template.yaml
kamilchodola Aug 14, 2024
d50ae88
Update test-assertoor.yml
kamilchodola Aug 14, 2024
ee0c724
Merge branch 'master' into kch/assertoor
kamilchodola Aug 14, 2024
a46e334
Merge branch 'master' into kch/assertoor
kamilchodola Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/tests/assertor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
participants_matrix:
el:
- el_type: nethermind
el_image: <DOCKER_IMAGE_PLACEHOLDER>
- el_type: geth
cl:
- cl_type: prysm
- cl_type: lighthouse
- cl_type: teku
- cl_type: lodestar
- cl_type: nimbus
network_params:
preset: "minimal"
additional_services:
- assertoor
<ASSERTOOR_PARAMS_PLACEHOLDER>
123 changes: 123 additions & 0 deletions .github/workflows/test-assertoor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Assertoor tests

on:
workflow_dispatch:
workflow_run:
workflows: ["Publish Docker image"]
branches: [master]
types:
- completed

jobs:
get_tests:
name: "Run assertoor tests on Nethermind pairs"
runs-on: ubuntu-latest
steps:
- name: Authenticate App
id: gh-app
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Checkout this repository
uses: actions/checkout@v4
with:
path: main-repo

- name: Checkout assertoor-test repository
uses: actions/checkout@v4
with:
repository: kamilchodola/assertoor-test
path: assertoor-test

- name: Set up Python
uses: actions/[email protected]
with:
python-version: '3.x'

- name: Install dependencies
run: pip install requests beautifulsoup4

- name: Run retriveAllTests.py script
run: |
python assertoor-test/scripts/retriveAllTests/retriveAllTests.py --exclude "pectra-dev" "verkle" "validator-lifecycle" "slashing" "mev" > /tmp/output.txt
cat /tmp/output.txt
chmod 777 /tmp/output.txt
echo "ASSERTOOR_PARAMS_FILE=/tmp/output.txt" >> $GITHUB_ENV

- name: Prepare docker tag
id: prepare_ref
run: |
REF_NAME=${{ inputs.nethermind_repo_ref || github.ref }}
CLEAN_REF=$(echo "${REF_NAME/refs\/heads\//}" | sed 's/[^a-zA-Z0-9._-]/-/g')
echo "CLEAN_REF=$CLEAN_REF" >> $GITHUB_ENV

- name: Set Repo and Org Variables
run: |
echo "ORG_NAME=${{ github.repository_owner }}" >> $GITHUB_ENV
echo "REPO_NAME=${{ github.event.repository.name }}" >> $GITHUB_ENV

- name: Check if master branch and default additional_options
id: check_conditions
run: |
ref="${{ github.ref }}"

if [[ $ref != refs/heads/* ]]; then
ref="refs/heads/$ref"
fi

if
[[ "$ref" == "refs/heads/master" ]] &&
[[ "${{ steps.extract_dockerfile.outputs.dockerfile }}" == "Dockerfile" ]] &&
[[ "${{ steps.extract_dockerfile.outputs.build-config }}" == "release" ]]; then
echo "skip_docker_build=true" >> $GITHUB_OUTPUT
else
echo "skip_docker_build=false" >> $GITHUB_OUTPUT
fi

- name: Trigger Docker Build Action with Cleaned Ref
if: steps.check_conditions.outputs.skip_docker_build != 'true'
uses: benc-uk/workflow-dispatch@v1
with:
workflow: publish-docker.yml
ref: "${{ github.ref }}"
token: "${{ steps.gh-app.outputs.token }}"
inputs: '{
"tag": "${{ env.CLEAN_REF }}",
"dockerfile": "${{ steps.extract_dockerfile.outputs.dockerfile }}",
"build-config": "${{ steps.extract_dockerfile.outputs.build-config }}"
}'

- name: Wait for Docker Build Action to complete
if: steps.check_conditions.outputs.skip_docker_build != 'true'
env:
GITHUB_TOKEN: ${{ steps.gh-app.outputs.token }}
WORKFLOW_ID: 'publish-docker.yml'
MAX_WAIT_MINUTES: "5"
INTERVAL: "5"
TIMEOUT: '20'
ORG_NAME: ${{ env.ORG_NAME }}
REPO_NAME: ${{ env.REPO_NAME }}
REF: ${{ github.ref }}
run: |
chmod +x main-repo/scripts/wait-for-workflow-completed.sh
./main-repo/scripts/wait-for-workflow-completed.sh
working-directory: ${{ github.workspace }}

- name: Replace Placeholders in YAML
run: |
assertoor_params=$(cat ${{ env.ASSERTOOR_PARAMS_FILE}})
sed -i "s|<DOCKER_IMAGE_PLACEHOLDER>|nethermindeth/nethermind:${{ env.CLEAN_REF }}|g" main-repo/.github/tests/assertor.yaml
sed -i "/<ASSERTOOR_PARAMS_PLACEHOLDER>/ {
r /tmp/output.txt
d
}" main-repo/.github/tests/assertor.yaml
cat main-repo/.github/tests/assertor.yaml

- name: Kurtosis Assertoor GitHub Action
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
ethereum_package_url: "github.com/ethpandaops/ethereum-package"
ethereum_package_branch: ""
ethereum_package_args: main-repo/.github/tests/assertor.yaml
Loading