ci: foresight test kit action

This commit is contained in:
esimov
2022-12-08 10:46:43 +02:00
parent 85b1046513
commit 8c589d74b3
2 changed files with 22 additions and 16 deletions

View File

@@ -2,9 +2,13 @@ name: build
on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
env:
FORESIGHT_UPLOADER_SIGNER_URL: https://upload.service.runforesight.us
WORKFLOW_TELEMETRY_BASE_URL: https://api.service.runforesight.us
jobs:
build:
@@ -18,6 +22,11 @@ jobs:
env:
GO111MODULE: "on"
steps:
- name: Collect Workflow Telemetry
if: always()
uses: runforesight/foresight-workflow-kit-action@v1
with:
api_key: ${{ secrets.FORESIGHT_PROJECT_WALL_APIKEY }}
- name: Install Go
uses: actions/setup-go@v2
with:
@@ -44,21 +53,18 @@ jobs:
- name: Download Go modules
run: go mod download
- name: Run Tests
- name: Build project
id: makefile
run: |
make test
- name: Collect Workflow Telemetry
uses: runforesight/foresight-workflow-kit-action@v1
if: ${{ always() }}
with:
api_key: c72ba9d2-2e6f-4d55-829b-13f0eb98436e
- name: Analyze Test and/or Coverage Results
if: always()
uses: runforesight/foresight-test-kit-action@v1
if: ${{ always() }}
with:
api_key: c72ba9d2-2e6f-4d55-829b-13f0eb98436e
test_format: JSON
test_framework: GOLANG
test_path: ./...
coverage_format: GOLANG
api_key: ${{ secrets.FORESIGHT_PROJECT_WALL_APIKEY }}
test_framework: golang
test_format: json
test_path: ./test-report.json
coverage_format: golang
coverage_path: |
coverage.out

View File

@@ -9,4 +9,4 @@ uninstall:
package:
@NOCOPY=1 ./build.sh package
test:
go test -v ./... -race -cover -run=. -count=1
go test -v -json ./... -run=. > ./test-report.json -coverprofile=coverage.out