-
-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (38 loc) · 1.01 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
name: CI
# This workflow is triggered on pushes & pull requests
on:
pull_request:
branches:
- main
push:
branches: [ main ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
container: ghcr.io/packagrio/packagr:latest-golang
env:
STATIC: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: |
go install github.com/golang/mock/[email protected]
go generate ./...
go test -coverprofile=coverage.txt -covermode=atomic -v ./...
- name: Archive coverage
uses: actions/upload-artifact@v3
if: success() || failure()
with:
name: coverage
path: ${{ github.workspace }}/coverage.txt
retention-days: 1
- name: Upload coverage report
uses: codecov/codecov-action@v2
if: success() || failure()
with:
files: ${{ github.workspace }}/coverage.txt
flags: unittests
fail_ci_if_error: true
verbose: true