-
Notifications
You must be signed in to change notification settings - Fork 11
40 lines (37 loc) · 1.11 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Collect Workflow Telemetry
uses: runforesight/foresight-workflow-kit-action@v1
if: success() || failure()
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- name: tests
run: scripts/cibuild
- name: Generate Foresight test data
run: go test -v -json -coverprofile=coverage.out ./...> ./test-report.json || true
- name: Analyze Test and/or Coverage Results
uses: runforesight/foresight-test-kit-action@v1
if: success() || failure()
with:
test_format: JSON
test_framework: GOLANG
test_path: "./test-report.json"
coverage_format: GOLANG
coverage_path: ./coverage.out
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
flags: micro