[TEST] Disable steps #25
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: Build Check | |
on: | |
push: | |
branches: | |
- master | |
- test | |
env: | |
GO_VERSION: 1.21.3 | |
GOPATH: ${{ github.workspace }}/go | |
WORKING_DIR: ${{ github.workspace }}/go/src/github.com/ethereum/go-ethereum | |
jobs: | |
build: | |
name: 'Run tests and build on ${{ matrix.os }}' | |
strategy: | |
fail-fast: false | |
matrix: | |
# Not enable for macos as there's a consistent failure: | |
# --- FAIL: TestUPNP_DDWRT (2.20s) | |
# ###[error] natupnp_test.go:165: not discovered | |
# must be sommething with Github Actions VM networking setup. | |
# Event Ubuntu requires a workaround | |
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 | |
path: ${{ env.WORKING_DIR }} | |
- name: 'Apply workaround to fix networking in Linux' | |
if: runner.os == 'Linux' | |
run: | | |
# https://github.com/actions/virtual-environments/issues/798 | |
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf | |
- name: 'Prepare environment' | |
run: | | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: 'Run tests and build all' | |
working-directory: ${{ env.WORKING_DIR }} | |
run: | | |
make test all | |
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@v1 | |
with: | |
name: docker-image | |
path: ${{ steps.build.outputs.output_dir }} | |
acceptance-tests-basic: | |
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: | |
- 'privacy-enhancements-upgrade || networks/template::istanbul-4nodes-pe' | |
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: | | |
echo ${{ steps.setup.outputs.dockerEnvFile }} | |
cat ${{ steps.setup.outputs.dockerEnvFile }} | |
echo "docker run..." | |
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' | |
if: always() | |
run: | | |
echo "docker images" | |
docker images | |
echo "docker ps -a" | |
docker ps -a | |
echo "LOG DUMP" | |
containers=$(sudo docker ps -a | awk '{if(NR>1) print $NF}') | |
host=$(hostname) | |
# loop through all containers | |
for container in $containers | |
do | |
echo "Container: $container" | |
docker logs $container | |
echo ================================ | |
done | |