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

update contracts tests #300

Merged
merged 18 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 5 additions & 33 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,28 @@ name: Build-Docker image

on:
push:
branches: [main]
branches: [main, develop, feature/ongoingPP]
pull_request:
branches: [main, develop, feature/ongoingPP]
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
node-version: [18.x]

steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set int-bot SSH key
run: |
touch /tmp/ssh-key
echo "${{ secrets.INT_BOT_SSH_KEY }}" > /tmp/ssh-key
chmod 400 /tmp/ssh-key
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
- name: Checkout code
uses: actions/checkout@v3
- name: setup
- name: Setup docker
run: |
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
npm i
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker
run: npm run docker:contracts
- name: Push docker image
run: npm run push:docker:contracts
# Steps to push multi-platform image, it relies on the previous step:
# npm run docker:contracts
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: hermeznetwork/geth-zkevm-contracts:1.5-integration
file: docker/Dockerfile
context: .
60 changes: 60 additions & 0 deletions .github/workflows/build-push-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build-Docker image and push it

on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]

steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Set int-bot SSH key
run: |
touch /tmp/ssh-key
echo "${{ secrets.INT_BOT_SSH_KEY }}" > /tmp/ssh-key
chmod 400 /tmp/ssh-key
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
- name: Checkout code
uses: actions/checkout@v3
- name: setup
run: |
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
npm i
sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker
run: npm run docker:contracts
- name: Push docker image
run: npm run push:docker:contracts
# Steps to push multi-platform image, it relies on the previous step:
# npm run docker:contracts
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
tags: hermeznetwork/geth-zkevm-contracts:1.5-integration
file: docker/Dockerfile
context: .
4 changes: 2 additions & 2 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Main CI

on:
push:
branches: [feature/ongoingPP]
branches: [main, develop, feature/ongoingPP]
pull_request:
branches: [feature/ongoingPP]
branches: [main, develop, feature/ongoingPP]

jobs:
lint-and-test:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Main CI

on:
push:
branches: [main, develop]
branches: [main, develop, feature/ongoingPP]
pull_request:
branches: [main, develop]
branches: [main, develop, feature/ongoingPP]

jobs:
lint-and-test:
Expand Down
10 changes: 9 additions & 1 deletion contracts/mocks/VerifierRollupHelperMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@
pragma solidity 0.8.20;

import "../interfaces/IVerifierRollup.sol";
import "../v2/interfaces/ISP1Verifier.sol";

contract VerifierRollupHelperMock is IVerifierRollup {
contract VerifierRollupHelperMock is IVerifierRollup, ISP1Verifier {
function verifyProof(
bytes32[24] calldata proof,
uint256[1] memory pubSignals
) public pure override returns (bool) {
return true;
}

// SP1 interface
function verifyProof(
bytes32 programVKey,
bytes calldata publicValues,
bytes calldata proofBytes
) public pure {}
}
Loading
Loading