NOTICK Step to close ports to avoid lingering process bound to ports #5989
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 PR | |
# Builds and runs tests on each push to a branch PR'ed against main. | |
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- 'design/**' | |
- 'planning/**' | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.20.4 | |
# Makes sure the artifacts are built correctly | |
- name: Build | |
run: go build -v ./... | |
# Makes sure the binaries for the eth2network are avail for all other tests | |
- name: Download eth2network binaries | |
run: go test ./... -v -count=1 -run TestEnsureBinariesAreAvail | |
# Close specified ports using lsof before testing / local port list compiled from ./integration/constants.go | |
- name: Close Integration Test Ports | |
run: ./.github/workflows/runner-scripts/close-ports.sh | |
- name: Test | |
run: go test --failfast -v ./... -count=1 -timeout 5m | |
- name: Store simulation logs | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: ci-logs | |
path: | | |
integration/.build/simulations/sim-log-*.txt | |
integration/.build/noderunner/noderunner-*.txt | |
integration/.build/wallet_extension/wal-ext-*.txt | |
integration/.build/eth2/* | |
integration/.build/faucet/* | |
integration/.build/tenscan/* | |
integration/.build/tengateway/* | |
integration/.build/contractdeployer/* | |
integration/.build/smartcontracts/* | |
retention-days: 1 | |