From 2fb3160951eaf7a3739d494a52299ac92f1dbbbb Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Mon, 7 Feb 2022 23:47:49 +0300 Subject: [PATCH] Include HTTP tests into the CI --- .github/workflows/test.yml | 16 ++++++++++++++-- Makefile | 3 +++ tap/extensions/http/Makefile | 6 +++--- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ec45bf46..7ba1e56fd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 diff --git a/Makefile b/Makefile index 289b85e68..f2df53568 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/tap/extensions/http/Makefile b/tap/extensions/http/Makefile index f2753b146..3ea4fb2eb 100644 --- a/tap/extensions/http/Makefile +++ b/tap/extensions/http/Makefile @@ -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