-
-
Notifications
You must be signed in to change notification settings - Fork 21
64 lines (53 loc) · 1.77 KB
/
ci.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: build
on:
push:
branches:
- main
pull_request:
jobs:
job-test:
name: Test
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEBUG: 1
steps:
- name: Show rate limit
run: |
curl -sL -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit
- name: Check out source code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
id: setup-go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: Run lint
uses: reviewdog/action-golangci-lint@v2
- name: Run govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: '${{ steps.setup-go.outputs.go-version }}'
check-latest: true
go-package: ./...
- name: Run tests
run: make ci
- name: Run test_central
if: ${{ github.event_name == 'pull_request' }}
run: make test_central
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'fs'
- name: Build octocov and run as a action
uses: ./testdata/actions/coverage
env:
MACKEREL_API_KEY: ${{ secrets.MACKEREL_API_KEY }}
OCTOCOV_CUSTOM_METRICS_BENCHMARK_1: ./testdata/custom_metrics/benchmark_1.json
OCTOCOV_CUSTOM_METRICS_BENCHMARK_0: ./testdata/custom_metrics/benchmark_0.json
- name: Show rate limit
run: |
curl -sL -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" https://api.github.com/rate_limit