-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (34 loc) · 1.03 KB
/
go.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
name: go test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go environment
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run tests with coverage
run: go test -v -race -covermode atomic -coverprofile=covprofile -coverpkg ./... ./...
- name: Install goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage report
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: goveralls -coverprofile=covprofile -service=github
code-security-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Fossa
run: |
curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash
- name: Run Code Security Analysis
env:
FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }}
run: fossa analyze