Update proof.go #86
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: integration tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
container: golang:1.19.13-bullseye | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Pull contracts repository, branch master | |
uses: actions/checkout@v4 | |
with: | |
repository: iden3/contracts | |
ref: master | |
path: ./contracts | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
cache-dependency-path: contracts/package-lock.json | |
- name: Run hardhat | |
working-directory: ./contracts | |
run: | | |
npm ci | |
npx hardhat node > hardhat.log 2>&1 & | |
- name: Deploy IRHSStorage to hardhat | |
working-directory: ./contracts | |
env: | |
STATE_CONTRACT_ADDRESS: "0x0000000000000000000000000000000000000000" | |
run: | | |
sleep 5 | |
npx hardhat run --network localhost scripts/deployIdentityTreeStore.ts > deploy_contracts.log | |
echo "IRHS_STORAGE_ADDRESS=$(cat deploy_contracts.log | grep -oP "(?<=to: ).*" | tail -1)" >> $GITHUB_ENV | |
echo "IRHSStorage deploy logs:" | |
cat deploy_contracts.log | |
- name: Integration Tests | |
run: go test -v -race ./... | |
working-directory: tests/integration | |
env: | |
RHS_URL: http://rhs:8080 | |
- name: Show Hardhat logs | |
run: cat ./contracts/hardhat.log | |
services: | |
rhs: | |
image: ghcr.io/iden3/reverse-hash-service:latest | |
credentials: | |
username: ${{ secrets.RHS_DOCKER_LOGIN }} | |
password: ${{ secrets.RHS_DOCKER_PASSWORD }} | |
env: | |
RHS_DB: "host=postgres password=pgpwd user=postgres" | |
volumes: | |
- vrhs:/opt | |
postgres: | |
image: postgres:14.2 | |
env: | |
POSTGRES_PASSWORD: pgpwd | |
volumes: | |
- vrhs:/docker-entrypoint-initdb.d | |