-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (31 loc) · 1.08 KB
/
pr.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
41
name: PR Checks
on:
pull_request:
branches: [ master , "*" ]
env:
GH_ACCESS_TOKEN: ${{ secrets.ARMOSEC_GITHUB_ACCESS_TOKEN }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ env.GH_ACCESS_TOKEN }}
- run: git config --global url.https://[email protected]/armosec/.insteadOf https://github.com/armosec/
- run: git config --global url.https://[email protected]/kubescape/.insteadOf https://github.com/kubescape/
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Get dependencies
run: go mod download
- name: Test
run: go test ./... -v --race -covermode=atomic -coverprofile=coverage.out
- name: Convert coverage count to lcov format
uses: jandelgado/gcov2lcov-action@v1
- name: Submit coverage tests to Coveralls
continue-on-error: true
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov