mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-05-18 15:17:10 +00:00
81 lines
1.7 KiB
YAML
81 lines
1.7 KiB
YAML
name: PR validation
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'develop'
|
|
- 'main'
|
|
jobs:
|
|
build-cli:
|
|
name: Build CLI
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.16
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.16'
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build CLI
|
|
run: make cli
|
|
|
|
build-agent:
|
|
name: Build Agent
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.16
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.16'
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- shell: bash
|
|
run: |
|
|
sudo apt-get install libpcap-dev
|
|
|
|
- name: Build Agent
|
|
run: make agent
|
|
|
|
run-tests-cli:
|
|
name: Run CLI tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.16
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.16'
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Test
|
|
run: make test-cli
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|
|
|
|
run-tests-agent:
|
|
name: Run Agent tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.16
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.16'
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
|
|
- shell: bash
|
|
run: |
|
|
sudo apt-get install libpcap-dev
|
|
|
|
- name: Test
|
|
run: make test-agent
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|