Skip to content

Commit 0f600b0

Browse files
authored
Merge pull request #61 from NethermindEth/feat/warmup-tests-update-workflow
Added Refresh Warmup Tests github workflow
2 parents 2d9e99f + 32253c1 commit 0f600b0

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Refresh Warmup Tests
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 5 * * 1"
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
refresh:
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 120
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.10"
27+
28+
- name: Set up .NET
29+
uses: actions/setup-dotnet@v4
30+
with:
31+
dotnet-version: "8.0.x"
32+
33+
- name: Install Python dependencies
34+
run: pip install -r requirements.txt
35+
36+
- name: Prepare Nethermind tools
37+
run: make prepare_tools
38+
39+
- name: Regenerate warmup tests
40+
run: |
41+
python3 make_warmup_tests.py -s eest_tests/ -d warmup-tests -g scripts/genesisfiles/geth/zkevmgenesis.json
42+
43+
- name: Detect repository changes
44+
id: git-status
45+
run: |
46+
git status --short
47+
if [[ -n "$(git status --porcelain)" ]]; then
48+
echo "changed=true" >> "$GITHUB_OUTPUT"
49+
else
50+
echo "changed=false" >> "$GITHUB_OUTPUT"
51+
fi
52+
53+
- name: Create pull request
54+
if: steps.git-status.outputs.changed == 'true'
55+
uses: peter-evans/create-pull-request@v6
56+
with:
57+
token: ${{ secrets.GITHUB_TOKEN }}
58+
commit-message: "chore: refresh warmup tests"
59+
committer: GitHub Actions <[email protected]>
60+
author: GitHub Actions <[email protected]>
61+
title: "chore: refresh warmup tests"
62+
body: |
63+
Automated refresh of warmup payloads via `make_warmup_tests.py`.
64+
- Sources: `warmup-tests`
65+
- Trigger: `${{ github.event_name }}`
66+
branch: chore/refresh-warmup-tests
67+
delete-branch: true
68+
add-paths: |
69+
warmup-tests/**
70+
71+
- name: Nothing to commit
72+
if: steps.git-status.outputs.changed == 'false'
73+
run: echo "Warmup tests already up to date."

0 commit comments

Comments
 (0)