👕 Fix linter and test workflows (#1241)

* Fix linter and test workflows

* Fix

* Fix

* Fix linter
This commit is contained in:
M. Mert Yıldıran
2022-11-22 11:33:46 -08:00
committed by GitHub
parent e7dec3d7a3
commit 7e6d89957a
6 changed files with 175 additions and 283 deletions

View File

@@ -1,11 +1,13 @@
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master
name: Test
concurrency:
group: kubeshark-tests-validation-${{ github.ref }}
cancel-in-progress: true
jobs:
run-unit-tests:
name: Unit Tests
@@ -22,46 +24,22 @@ jobs:
with:
go-version: '^1.17'
- name: Install libpcap
shell: bash
run: |
sudo apt-get install libpcap-dev
- name: Install Capstone
- name: Install dependencies
shell: bash
run: |
sudo apt update
sudo apt install -y \
libpcap-dev \
llvm \
libbpf-dev \
linux-headers-$(uname -r)
./devops/install-capstone.sh
- name: Generate eBPF object files and go bindings
id: generate_ebpf
- name: Generate eBPF object files and Go bindings
run: make bpf
- 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: Test
run: make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2