-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (56 loc) · 1.58 KB
/
testing.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
name: testing
on:
pull_request:
push:
branches: [master]
tags-ignore:
- '*' # Ignores all tag names
jobs:
testing:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -coverprofile=unit.coverage.out ./...
# Uncomment for uploading when setup
# - name: Upload results to Codecov
# uses: codecov/codecov-action@v4
# with:
# files: ./unit.coverage.out
# fail_ci_if_error: false
# flags: unittests
# name: codecov-umbrella
# token: ${{ secrets.CODECOV_TOKEN }}
# verbose: true
# - name: Upload coverage report
# uses: actions/upload-artifact@v2
# with:
# name: coverage-report
# path: unit.coverage.out
# codacy-coverage-reporter:
# needs: testing
# runs-on: ubuntu-latest
# name: codacy-coverage-reporter
# steps:
# - uses: actions/checkout@v2
# - name: Download coverage report
# uses: actions/download-artifact@v2
# with:
# name: coverage-report
# - name: Run codacy-coverage-reporter
# uses: codacy/[email protected]
# with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# coverage-reports: unit.coverage.out
# force-coverage-parser: go