generated from deploymenttheory/Template
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (45 loc) · 1.05 KB
/
unit-tests.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
name: Unit Tests
on:
push:
branches: [ '*' ]
paths-ignore:
- '**/*.yml'
- '**/*.md'
- '**/*.yml'
- 'LICENSE'
- '.gitignore'
- '.editorconfig'
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- 'examples/**'
- 'website/**'
- '.vscode/**'
- '.idea/**'
- '**/*.txt'
- '**/*.png'
- '**/*.jpg'
- '**/*.svg'
- '.golangci.yml'
- 'Makefile'
- 'scripts/**'
- '.dockerignore'
- 'dockerfile'
jobs:
test:
name: '🧪 Run Unit Tests'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/[email protected]
with:
egress-policy: audit
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
go-version-file: 'go.mod'
cache: true
go-version: stable
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...