Skip to content

Feature/set431 global whitelist contracts #1117

Feature/set431 global whitelist contracts

Feature/set431 global whitelist contracts #1117

Workflow file for this run

name: Pull Request Check
on:
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
- .gitignore
env:
GO_VERSION: 1.19
jobs:
lint:
name: 'Code linters'
runs-on: ubuntu-20.04
steps:
- name: 'Setup Go ${{ env.GO_VERSION }}'
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
- name: 'Check out project files'
uses: actions/checkout@v3
with:
fetch-depth: '0'
submodules: false
- name: 'Prepare environment'
run: |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: 'Run code linters'
run: |
GO111MODULE=on make lint
unit-tests:
name: 'Unit tests in ${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
env:
QUORUM_IGNORE_TEST_PACKAGES: github.com/ethereum/go-ethereum/les,github.com/ethereum/go-ethereum/les/flowcontrol,github.com/ethereum/go-ethereum/mobile
runs-on: ${{ matrix.os }}
steps:
- name: 'Setup Go ${{ env.GO_VERSION }}'
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
- name: 'Check out project files'
uses: actions/checkout@v2
with:
submodules: recursive
- name: 'Prepare environment'
run: |
# https://github.com/actions/virtual-environments/issues/798
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: 'Run unit tests'
run: |
make test
docker-build:
name: 'Build Docker image'
runs-on: ubuntu-20.04
steps:
- name: 'Check out project files'
uses: actions/checkout@v2
- name: 'Build docker image'
id: build
run: |
output_dir=${{ runner.temp }}/docker
mkdir -p $output_dir
docker build -t quorumengineering/quorum:pr .
docker save quorumengineering/quorum:pr > quorum-pr.tar
tar cfvz $output_dir/quorum-pr.tar.gz quorum-pr.tar
echo "::set-output name=output_dir::$output_dir"
- name: 'Upload workflow artifact - Docker image'
uses: actions/upload-artifact@v2
with:
name: docker-image
path: ${{ steps.build.outputs.output_dir }}
peeps-tests:
name: Run PEEPS tests
needs:
- docker-build
runs-on: ubuntu-20.04
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Download workflow artifact - Docker image'
uses: actions/download-artifact@v1
with:
name: docker-image
- name: 'Load Docker image'
id: setup
run: |
tar xfvz docker-image/quorum-pr.tar.gz
docker load --input quorum-pr.tar
docker image tag quorumengineering/quorum:pr quorumengineering/quorum:develop
docker image ls
- name: Set up Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 11
check-latest: true
- name: PEEPS
run: |
cd build
./run-peeps.sh
- name: PEEPS Test Report
uses: mikepenz/action-junit-report@v2
if: always()
with:
report_paths: '**/build/test-results/*/TEST-*.xml'
check_name: PEEPS test report
acceptance-tests:
name: Acceptance tests (${{ matrix.tag }})
needs:
- docker-build
if: success()
strategy:
fail-fast: false
matrix:
# list of tag expression being executed in parallel
# for PR, only selective tests are run.
# More comprehensive suites are scheduled to run in master
tag:
- 'basic || basic-raft || (advanced && raft) || networks/typical::raft'
- 'basic || basic-istanbul || (advanced && istanbul && !block-heights) || networks/typical::istanbul'
- 'basic || basic-istanbul || (advanced && istanbul && !block-heights) || empty-block-period || block-reward || networks/typical::qbft'
- 'validator-management && networks/template::istanbul-3plus1'
- 'validator-management && networks/template::qbft-3plus1'
- 'multitenancy && networks/plugins::raft-multitenancy'
- 'migration && networks/template::istanbul-4nodes'
- 'migration && networks/template::raft-4nodes'
- 'basic || networks/typical::raftmps'
- 'basic || networks/typical::istanbulmps'
- 'basic || networks/typical::qbftmps'
runs-on: ubuntu-20.04
steps:
- name: 'Download workflow artifact - Docker image'
uses: actions/download-artifact@v1
with:
name: docker-image
- name: 'Load Docker image'
id: setup
run: |
tar xfvz docker-image/quorum-pr.tar.gz
docker load --input quorum-pr.tar
docker_env_file="${{ runner.temp }}/env.list"
echo "TF_VAR_quorum_docker_image={ name = \"quorumengineering/quorum:pr\", local = true }" >> $docker_env_file
echo "::set-output name=outputDir::${{ runner.temp }}"
echo "::set-output name=dockerEnvFile::$docker_env_file"
- name: 'Run acceptance tests'
run: |
cat ${{ steps.setup.outputs.dockerEnvFile }}
docker run --rm \
--network host \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ${{ steps.setup.outputs.outputDir }}:${{ steps.setup.outputs.outputDir }} \
--env-file ${{ steps.setup.outputs.dockerEnvFile }} \
quorumengineering/acctests:latest test \
-Pauto \
-Dauto.outputDir=${{ steps.setup.outputs.outputDir }} \
-Dtags="${{ matrix.tag }}"
- name: 'Debug'
run: |
docker images
docker ps -a