-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (36 loc) · 992 Bytes
/
test.yml
File metadata and controls
43 lines (36 loc) · 992 Bytes
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: Tests
on:
push:
branches: [ "main" ]
pull_request:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/test.yml' # for testing changes to the workflow
permissions:
contents: read
# Cancel in-progress runs when a new workflow with the same group name is triggered
# see: https://www.meziantou.net/how-to-cancel-github-workflows-when-pushing-new-commits-on-a-branch.htm
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Clone the code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Running Unit Tests
run: |
go mod tidy
make test
- name: Running Integration Tests
run: |
go mod tidy
make test-integration