Add tests to CI

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
Marina Biryukova 2023-08-08 16:16:52 +03:00
parent 1fcaba319e
commit 2c92802c53
2 changed files with 21 additions and 4 deletions

View file

@ -1,4 +1,4 @@
name: Linters
name: Tests and linters
on: [pull_request]
jobs:
@ -18,3 +18,19 @@ jobs:
uses: https://github.com/golangci/golangci-lint-action@v3
with:
version: latest
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
cache: true
- name: Run tests
run: make test

View file

@ -26,8 +26,9 @@ image:
@echo Version: $(VERSION)
docker build -t $(LEGO_IMAGE) .
test: clean
go test -v -cover ./...
test:
@echo "⇒ Running go test"
@go test ./... -count=1
e2e: clean
LEGO_E2E_TESTS=local go test -count=1 -v ./e2e/...