forked from TrueCloudLab/lego
Add tests to CI
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
This commit is contained in:
parent
1fcaba319e
commit
2c92802c53
2 changed files with 21 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
name: Linters
|
name: Tests and linters
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -18,3 +18,19 @@ jobs:
|
||||||
uses: https://github.com/golangci/golangci-lint-action@v3
|
uses: https://github.com/golangci/golangci-lint-action@v3
|
||||||
with:
|
with:
|
||||||
version: latest
|
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
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -26,8 +26,9 @@ image:
|
||||||
@echo Version: $(VERSION)
|
@echo Version: $(VERSION)
|
||||||
docker build -t $(LEGO_IMAGE) .
|
docker build -t $(LEGO_IMAGE) .
|
||||||
|
|
||||||
test: clean
|
test:
|
||||||
go test -v -cover ./...
|
@echo "⇒ Running go test"
|
||||||
|
@go test ./... -count=1
|
||||||
|
|
||||||
e2e: clean
|
e2e: clean
|
||||||
LEGO_E2E_TESTS=local go test -count=1 -v ./e2e/...
|
LEGO_E2E_TESTS=local go test -count=1 -v ./e2e/...
|
||||||
|
|
Loading…
Reference in a new issue