Include HTTP tests into the CI

This commit is contained in:
M. Mert Yildiran
2022-02-07 23:47:49 +03:00
parent 5299b20a8f
commit 2fb3160951
3 changed files with 20 additions and 5 deletions

View File

@@ -27,19 +27,31 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- shell: bash
- name: Install libpcap
shell: bash
run: |
sudo apt-get install libpcap-dev
- name: Install gsutil
shell: bash
run: |
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
sudo apt-get update
sudo apt-get install google-cloud-sdk
- name: CLI Test
run: make test-cli
- name: Agent Test
run: make test-agent
- name: Shared Test
run: make test-shared
- name: Extensions Test
run: make test-extensions
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2

View File

@@ -92,5 +92,8 @@ test-agent:
test-shared:
@echo "running shared tests"; cd shared && $(MAKE) test
test-extensions:
@echo "running http tests"; cd tap/extensions/http && $(MAKE) test
acceptance-test:
@echo "running acceptance tests"; cd acceptanceTests && $(MAKE) test

View File

@@ -1,8 +1,8 @@
test: test-pull
MIZU_TEST=1 go test *.go -covermode=atomic -coverprofile=coverage.out
@MIZU_TEST=1 go test -v ./... -coverpkg=./... -coverprofile=coverage.out -covermode=atomic
test-update: test-pull
MIZU_TEST=1 TEST_UPDATE=1 go test *.go -v -covermode=atomic -coverprofile=coverage.out
@MIZU_TEST=1 TEST_UPDATE=1 go test -v ./... -coverpkg=./... -coverprofile=coverage.out -covermode=atomic
test-pull:
./pull.sh
@./pull.sh