v0.9 backports #4177
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: Tetragon Go Test | |
on: | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 40 | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.18.3' | |
- name: Checkout code | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | |
with: | |
path: go/src/github.com/cilium/tetragon/ | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libelf-dev netcat-traditional libcap-dev gcc | |
sudo sed -i '/secure_path/d' /etc/sudoers | |
sudo sed -i '/env_reset/d' /etc/sudoers | |
echo `which clang` | |
echo `which llc` | |
echo `clang --version` | |
- name: Ensure BPF programs pass verifier | |
run: | | |
cd go/src/github.com/cilium/tetragon/ | |
make verify | |
- name: Run go tests | |
env: | |
GOPATH: /home/runner/work/tetragon/tetragon/go | |
SUDO: sudo -E | |
run: | | |
cd go/src/github.com/cilium/tetragon/ | |
make check-copyright | |
sudo -E echo "run go tests: " `uname -a` | |
sudo -E go mod verify | |
sudo -E GO111MODULE=off go get -u golang.org/x/lint/golint | |
export TETRAGON_LIB=$(realpath "bpf/objs/") | |
make test | |
- name: Upload Tetragon logs | |
if: failure() | |
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 | |
with: | |
name: tetragon-json | |
path: /tmp/tetragon.gotest* | |
retention-days: 5 | |
- name: Upload bugtool dumps | |
if: failure() | |
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 | |
with: | |
name: tetragon-bugtool | |
path: /tmp/tetragon-bugtool* | |
retention-days: 5 |