internal: start adding tests to outpost

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-01-24 20:12:25 +01:00
parent c7ba183dc0
commit e70e031a1f
5 changed files with 179 additions and 0 deletions

View File

@ -30,9 +30,34 @@ jobs:
-w /app \
golangci/golangci-lint:v1.43 \
golangci-lint run -v --timeout 200s
test-unittest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.17"
- name: Get dependencies
run: |
go get github.com/axw/gocov/gocov
go get github.com/AlekSi/gocov-xml
go get github.com/jstemmer/go-junit-report
- name: Go unittests
run: |
go test -timeout 0 -v -race -coverprofile=coverage.out -covermode=atomic -cover ./... | go-junit-report > junit.xml
- uses: testspace-com/setup-testspace@v1
with:
domain: ${{github.repository_owner}}
- name: run testspace
if: ${{ always() }}
run: |
gocov convert coverage.out | gocov-xml > coverage.xml
testspace [outpost]junit.xml --link=codecov
testspace [outpost]coverage.xml --link=codecov
ci-outpost-mark:
needs:
- lint-golint
- test-unittest
runs-on: ubuntu-latest
steps:
- run: echo mark