diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8c021a9..d40362e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 \ No newline at end of file + 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 \ No newline at end of file diff --git a/Makefile b/Makefile index fd50e77..e8afa55 100644 --- a/Makefile +++ b/Makefile @@ -9,4 +9,4 @@ uninstall: package: @NOCOPY=1 ./build.sh package test: - go test -v ./... -race -cover -run=. -count=1 \ No newline at end of file + go test -v -json ./... -run=. > ./test-report.json -coverprofile=coverage.out \ No newline at end of file