Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Commit e728386

Browse files
Improve GHA (#2031)
Remove prover mock and ok-to-test
1 parent b5978c5 commit e728386

File tree

15 files changed

+4
-2057
lines changed

15 files changed

+4
-2057
lines changed

.github/workflows/ok-to-test.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/test-e2e.yml

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ on:
99
- update-external-dependencies
1010
- 'release/**'
1111
pull_request:
12-
repository_dispatch:
13-
types: [ok-to-test-command]
1412

1513
jobs:
16-
trusted-test-e2e:
17-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
14+
test-e2e:
1815
strategy:
1916
fail-fast: false
2017
matrix:
@@ -33,12 +30,6 @@ jobs:
3330
env:
3431
GOARCH: ${{ matrix.goarch }}
3532

36-
- name: Login to DockerHub
37-
uses: docker/login-action@v2
38-
with:
39-
username: ${{ secrets.DOCKERHUB_USERNAME }}
40-
password: ${{ secrets.DOCKERHUB_TOKEN }}
41-
4233
- name: Build Docker
4334
run: make build-docker
4435

@@ -49,74 +40,3 @@ jobs:
4940
- name: Test
5041
run: make test-e2e-group-${{ matrix.e2e-group }}
5142
working-directory: test
52-
53-
from-fork-test-e2e:
54-
if:
55-
github.event_name == 'repository_dispatch' &&
56-
github.event.client_payload.slash_command.sha != '' &&
57-
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
58-
strategy:
59-
matrix:
60-
go-version: [ 1.18.x ]
61-
goarch: [ "amd64" ]
62-
e2e-group: [ 1, 2, 3, 4, 5, 6, 7 ]
63-
runs-on: ubuntu-latest
64-
steps:
65-
- name: Fork based /ok-to-test checkout
66-
uses: actions/checkout@v3
67-
with:
68-
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
69-
70-
- name: Install Go
71-
uses: actions/setup-go@v3
72-
with:
73-
go-version: ${{ matrix.go-version }}
74-
env:
75-
GOARCH: ${{ matrix.goarch }}
76-
77-
- name: Login to DockerHub
78-
uses: docker/login-action@v2
79-
with:
80-
username: ${{ secrets.DOCKERHUB_USERNAME }}
81-
password: ${{ secrets.DOCKERHUB_TOKEN }}
82-
83-
- name: Build Docker
84-
run: make build-docker
85-
86-
- name: Compile SCs
87-
run: make compile-scs
88-
working-directory: test
89-
90-
- name: Test
91-
run: make test-e2e-group-${{ matrix.e2e-group }}
92-
working-directory: test
93-
94-
# Update check run
95-
- uses: actions/github-script@v5
96-
id: update-check-run
97-
if: ${{ always() }}
98-
env:
99-
number: ${{ github.event.client_payload.pull_request.number }}
100-
job: ${{ github.job }}
101-
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
102-
conclusion: ${{ job.status }}
103-
with:
104-
github-token: ${{ secrets.GITHUB_TOKEN }}
105-
script: |
106-
const { data: pull } = await github.rest.pulls.get({
107-
...context.repo,
108-
pull_number: process.env.number
109-
});
110-
const ref = pull.head.sha;
111-
const { data: checks } = await github.rest.checks.listForRef({
112-
...context.repo,
113-
ref
114-
});
115-
const check = checks.check_runs.filter(c => c.name === process.env.job);
116-
const { data: result } = await github.rest.checks.update({
117-
...context.repo,
118-
check_run_id: check[0].id,
119-
status: 'completed',
120-
conclusion: process.env.conclusion
121-
});
122-
return result;

.github/workflows/test-from-prover.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/test-full-non-e2e.yml

Lines changed: 1 addition & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,9 @@ on:
99
- update-external-dependencies
1010
- 'release/**'
1111
pull_request:
12-
repository_dispatch:
13-
types: [ok-to-test-command]
1412

1513
jobs:
16-
trusted-test-full-non-e2e:
17-
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
14+
test-full-non-e2e:
1815
strategy:
1916
matrix:
2017
go-version: [ 1.18.x ]
@@ -31,54 +28,6 @@ jobs:
3128
env:
3229
GOARCH: ${{ matrix.goarch }}
3330

34-
- name: Login to DockerHub
35-
uses: docker/login-action@v2
36-
with:
37-
username: ${{ secrets.DOCKERHUB_USERNAME }}
38-
password: ${{ secrets.DOCKERHUB_TOKEN }}
39-
40-
- name: Compile SCs
41-
run: make compile-scs
42-
working-directory: test
43-
44-
- name: Test
45-
env:
46-
ZKPROVER_URI: 127.0.0.1
47-
run: make test-full-non-e2e
48-
working-directory: test
49-
50-
from-fork-test-full-non-e2e:
51-
if:
52-
github.event_name == 'repository_dispatch' &&
53-
github.event.client_payload.slash_command.sha != '' &&
54-
contains(github.event.client_payload.pull_request.head.sha, github.event.client_payload.slash_command.sha)
55-
strategy:
56-
matrix:
57-
go-version: [ 1.18.x ]
58-
goarch: [ "amd64" ]
59-
runs-on: ubuntu-latest
60-
steps:
61-
- name: Fork based /ok-to-test checkout
62-
uses: actions/checkout@v3
63-
with:
64-
ref: 'refs/pull/${{ github.event.client_payload.pull_request.number }}/merge'
65-
66-
- name: Install Go
67-
uses: actions/setup-go@v3
68-
with:
69-
go-version: ${{ matrix.go-version }}
70-
env:
71-
GOARCH: ${{ matrix.goarch }}
72-
73-
- name: Login to DockerHub
74-
uses: docker/login-action@v2
75-
with:
76-
username: ${{ secrets.DOCKERHUB_USERNAME }}
77-
password: ${{ secrets.DOCKERHUB_TOKEN }}
78-
79-
- name: Build Docker
80-
run: make build-docker
81-
8231
- name: Compile SCs
8332
run: make compile-scs
8433
working-directory: test
@@ -88,32 +37,3 @@ jobs:
8837
ZKPROVER_URI: 127.0.0.1
8938
run: make test-full-non-e2e
9039
working-directory: test
91-
92-
# Update check run
93-
- uses: actions/github-script@v5
94-
id: update-check-run
95-
if: ${{ always() }}
96-
env:
97-
number: ${{ github.event.client_payload.pull_request.number }}
98-
job: ${{ github.job }}
99-
conclusion: ${{ job.status }}
100-
with:
101-
github-token: ${{ secrets.GITHUB_TOKEN }}
102-
script: |
103-
const { data: pull } = await github.rest.pulls.get({
104-
...context.repo,
105-
pull_number: process.env.number
106-
});
107-
const ref = pull.head.sha;
108-
const { data: checks } = await github.rest.checks.listForRef({
109-
...context.repo,
110-
ref
111-
});
112-
const check = checks.check_runs.filter(c => c.name === process.env.job);
113-
const { data: result } = await github.rest.checks.update({
114-
...context.repo,
115-
check_run_id: check[0].id,
116-
status: 'completed',
117-
conclusion: process.env.conclusion
118-
});
119-
return result;

docs/ci/actions.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ PR opened and pushing changes to PRs.
2323

2424
Pushes docker images to docker hub, the images pushed are:
2525
* `hermeznetwork/zkevm-node:develop`
26-
* `hermeznetwork/zkprover-mock:develop`
2726

2827
### When is executed
2928

@@ -33,7 +32,6 @@ Changes pushed to the `develop` branch.
3332

3433
Pushes docker images to docker hub, the images pushed are:
3534
* `hermeznetwork/zkevm-node:latest`
36-
* `hermeznetwork/zkprover-mock:latest`
3735

3836
### When is executed
3937

test/Makefile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ DOCKERCOMPOSEEXPLORERL2 := zkevm-explorer-l2
1515
DOCKERCOMPOSEEXPLORERL2DB := zkevm-explorer-l2-db
1616
DOCKERCOMPOSEEXPLORERRPC := zkevm-explorer-json-rpc
1717
DOCKERCOMPOSEZKPROVER := zkevm-prover
18-
DOCKERCOMPOSEZKPROVERMOCK := zkprover-mock
1918
DOCKERCOMPOSEPERMISSIONLESSDB := zkevm-permissionless-db
2019
DOCKERCOMPOSEPERMISSIONLESSNODE := zkevm-permissionless-node
2120
DOCKERCOMPOSEPERMISSIONLESSZKPROVER := zkevm-permissionless-prover
@@ -41,7 +40,6 @@ RUNEXPLORERL2 := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2)
4140
RUNEXPLORERL2DB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERL2DB)
4241
RUNEXPLORERJSONRPC := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEEXPLORERRPC)
4342
RUNZKPROVER := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEZKPROVER)
44-
RUNZKPROVERMOCK := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEZKPROVERMOCK)
4543

4644
RUNPERMISSIONLESSDB := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPERMISSIONLESSDB)
4745
RUNPERMISSIONLESSNODE := $(DOCKERCOMPOSE) up -d $(DOCKERCOMPOSEPERMISSIONLESSNODE)
@@ -71,7 +69,6 @@ STOPEXPLORERL2 := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEEXPLORERL2) && $(DOCKERCO
7169
STOPEXPLORERL2DB := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEEXPLORERL2DB) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEEXPLORERL2DB)
7270
STOPEXPLORERJSONRPC := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEEXPLORERRPC) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEEXPLORERRPC)
7371
STOPZKPROVER := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEZKPROVER) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEZKPROVER)
74-
STOPZKPROVERMOCK := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEZKPROVERMOCK) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEZKPROVERMOCK)
7572

7673
STOPPERMISSIONLESSDB := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEPERMISSIONLESSDB) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEPERMISSIONLESSDB)
7774
STOPPERMISSIONLESSNODE := $(DOCKERCOMPOSE) stop $(DOCKERCOMPOSEPERMISSIONLESSNODE) && $(DOCKERCOMPOSE) rm -f $(DOCKERCOMPOSEPERMISSIONLESSNODE)
@@ -89,9 +86,7 @@ test-full-non-e2e: stop ## Runs non-e2e tests checking race conditions
8986
$(RUNPOOLDB)
9087
$(RUNEVENTDB)
9188
$(RUNZKPROVER)
92-
sleep 5
93-
$(RUNZKPROVERMOCK)
94-
sleep 2
89+
sleep 7
9590
$(RUNL1NETWORK)
9691
sleep 15
9792
docker logs $(DOCKERCOMPOSEZKPROVER)
@@ -259,14 +254,6 @@ run-zkprover: ## Runs zkprover
259254
stop-zkprover: ## Stops zkprover
260255
$(STOPZKPROVER)
261256

262-
.PHONY: run-zkprover-mock
263-
run-zkprover-mock: ## Runs zkprover-mock
264-
$(RUNZKPROVERMOCK)
265-
266-
.PHONY: stop-zkprover-mock
267-
stop-zkprover-mock: ## Stops zkprover-mock
268-
$(STOPZKPROVERMOCK)
269-
270257
.PHONY: run-l1-explorer
271258
run-l1-explorer: ## Runs L1 blockscan explorer
272259
$(RUNEXPLORERL1DB)

test/operations/wait.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const (
3030
// DefaultInterval is a time interval
3131
DefaultInterval = 2 * time.Millisecond
3232
// DefaultDeadline is a time interval
33-
DefaultDeadline = 30 * time.Second
33+
DefaultDeadline = 2 * time.Minute
3434
// DefaultTxMinedDeadline is a time interval
3535
DefaultTxMinedDeadline = 5 * time.Second
3636
)

tools/zkevmprovermock/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

tools/zkevmprovermock/cmd/client.go

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)