Skip to content

Commit

Permalink
ci: optimize the integration-test (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 authored Sep 2, 2022
1 parent 440bf08 commit 10168a9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@ jobs:
echo "start deploy new zkbas"
sudo bash ./deployment/tool/generate_api.sh
go mod tidy
docker image prune -f
make docker-image
cp -r /server/test.keyfile ./deployment/
mv ./deployment/test.keyfile ./deployment/.zkbas
blockNr=$(sudo bash ./deployment/tool/tool.sh blockHeight)
sudo bash ./deployment/tool/tool.sh all new
sudo bash ./deployment/tool/tool.sh all
sudo bash ./deployment/docker-compose/docker-compose.sh down
sudo bash ./deployment/docker-compose/docker-compose.sh up $blockNr
echo "Waiting 10m for the initialization tx to be verified"
sleep 10m # Waiting for the initialization tx to be verified
echo "end deploy"
- name: run integration test
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/issue-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Issue Trigger

on:
pull_request:
types: [opened, edited, closed]
issue_comment:
types: [created, edited, deleted]

jobs:
trigger:
runs-on: self-hosted
permissions:
issues: write
pull-requests: write
steps:
- name: update-integration-keyfile
if: contains(github.event.pull_request.body, '/update-integration-keyfile') # check the comment if it contains the keywords
run: |
cd /server
sudo rm -rf ./zkbas
sudo git clone --branch develop https://github.com/bnb-chain/zkbas.git
cd ./zkbas
sudo bash ./deployment/tool/tool.sh prepare new
sudo rm -rf /server/test.keyfile
sudo cp -r ./deployment/.zkbas /server/test.keyfile
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

***/types/types.go

*.vk
*.pk

**/main

*.pk
*.vk

build
vendor
deployment/dependency
Expand Down

0 comments on commit 10168a9

Please sign in to comment.