mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-09 12:29:17 +00:00
CI: test share module (#763)
This commit is contained in:
parent
bfa275d08d
commit
5b53252033
31
.github/workflows/test.yml
vendored
31
.github/workflows/test.yml
vendored
@ -15,26 +15,8 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-tests-cli:
|
run-unit-tests:
|
||||||
name: CLI Tests
|
name: Unit 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: Agent Tests
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.16
|
- name: Set up Go 1.16
|
||||||
@ -49,8 +31,15 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
sudo apt-get install libpcap-dev
|
sudo apt-get install libpcap-dev
|
||||||
|
|
||||||
- name: Test
|
- name: CLI Test
|
||||||
|
run: make test-cli
|
||||||
|
|
||||||
|
- name: Agent Test
|
||||||
run: make test-agent
|
run: make test-agent
|
||||||
|
|
||||||
|
- name: Shared Test
|
||||||
|
run: make test-shared
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
uses: codecov/codecov-action@v2
|
uses: codecov/codecov-action@v2
|
||||||
|
|
||||||
|
3
Makefile
3
Makefile
@ -89,5 +89,8 @@ test-cli:
|
|||||||
test-agent:
|
test-agent:
|
||||||
@echo "running agent tests"; cd agent && $(MAKE) test
|
@echo "running agent tests"; cd agent && $(MAKE) test
|
||||||
|
|
||||||
|
test-shared:
|
||||||
|
@echo "running shared tests"; cd shared && $(MAKE) test
|
||||||
|
|
||||||
acceptance-test:
|
acceptance-test:
|
||||||
@echo "running acceptance tests"; cd acceptanceTests && $(MAKE) test
|
@echo "running acceptance tests"; cd acceptanceTests && $(MAKE) test
|
||||||
|
2
shared/Makefile
Normal file
2
shared/Makefile
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
test: ## Run shared tests.
|
||||||
|
@go test ./... -coverpkg=./... -race -coverprofile=coverage.out -covermode=atomic
|
Loading…
Reference in New Issue
Block a user