-
Notifications
You must be signed in to change notification settings - Fork 18
43 lines (35 loc) · 953 Bytes
/
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
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
run-tests:
runs-on: ubuntu-latest
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.18
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
- name: Build the binary
run: make build
- name: Setup tests
run: make test_setup
env:
CODE_PATH: /home/runner/code
- name: Run tests
run: make test
env:
CODE_PATH: /home/runner/code
- name: Report test coverage to DeepSource
run: |
curl https://deepsource.io/cli | sh
./bin/deepsource report --analyzer test-coverage --key go --value-file ./coverage.out