mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-05-20 08:04:06 +00:00
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
name: Test
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- 'develop'
|
|
- 'main'
|
|
push: # needed to upload test coverage report to codecov
|
|
branches:
|
|
- 'develop'
|
|
- 'main'
|
|
|
|
concurrency:
|
|
group: mizu-tests-validation-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
run-unit-tests:
|
|
name: Unit Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Set up Go 1.17
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: '^1.17'
|
|
|
|
- name: Install libpcap
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get install libpcap-dev
|
|
|
|
- name: Check CLI modified files
|
|
id: cli_modified_files
|
|
run: devops/check_modified_files.sh cli/
|
|
|
|
- name: CLI Test
|
|
if: github.event_name == 'push' || steps.cli_modified_files.outputs.matched == 'true'
|
|
run: make test-cli
|
|
|
|
- name: Check Agent modified files
|
|
id: agent_modified_files
|
|
run: devops/check_modified_files.sh agent/
|
|
|
|
- name: Agent Test
|
|
if: github.event_name == 'push' || steps.agent_modified_files.outputs.matched == 'true'
|
|
run: make test-agent
|
|
|
|
- name: Shared Test
|
|
run: make test-shared
|
|
|
|
- name: Check extensions modified files
|
|
id: ext_modified_files
|
|
run: devops/check_modified_files.sh tap/extensions/ tap/api/
|
|
|
|
- name: Extensions Test
|
|
if: github.event_name == 'push' || steps.ext_modified_files.outputs.matched == 'true'
|
|
run: make test-extensions
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v2
|