fix: device name always eth0 in iptable network attack partition #691
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: ci | |
on: | |
pull_request: | |
branches: | |
- main | |
- release-* | |
jobs: | |
pull: | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [amd64, arm64] | |
job: | |
- verify | |
- build | |
- unit-test | |
- integration-test | |
runs-on: ${{ fromJson('{"amd64":"ubuntu-latest", "arm64":["self-hosted", "Linux", "ARM64"]}')[matrix.arch] }} | |
steps: | |
- name: Set up Go 1.18 | |
uses: actions/setup-go@v1 | |
with: | |
go-version: 1.18.2 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
path: go/src/github.com/${{ github.repository }} | |
- name: ${{ matrix.job }} | |
run: | | |
# workaround for https://github.com/actions/setup-go/issues/14 | |
export GOPATH=${GITHUB_WORKSPACE}/go | |
export PATH=$PATH:$GOPATH/bin | |
#use sh function | |
if [[ "$job" == "verify" ]]; then | |
# preload go modules before goimports | |
go mod download -x | |
make check | |
make groupimports || echo 0 | |
echo "Please make check before creating a PR" | |
git diff --quiet -- . || (git diff | cat && false) | |
elif [[ "$job" == "build" ]]; then | |
make build | |
elif [[ "$job" == "unit-test" ]]; then | |
make unit-test | |
elif [[ "$job" == "integration-test" ]]; then | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install -y stress-ng | |
make integration-test | |
else | |
make $job | |
fi | |
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }} | |
env: | |
job: ${{ matrix.job }} |