forked from kilnfi/go-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (63 loc) · 1.69 KB
/
pr.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
63
64
name: Pull Request Check
on:
pull_request:
paths-ignore:
- '**.md'
- .gitignore
env:
GO_VERSION: "1.20"
jobs:
unit-tests:
name: 'Unit tests in ${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
runs-on: ${{ matrix.os }}
steps:
- name: 'Setup go ${{ env.GO_VERSION }}'
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: 'Check out project files'
uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Run unit tests and generage HTML coverage report'
run: |
make unit-test-cov
integration-tests:
name: 'Integration tests in ${{ matrix.os }}'
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v3
with:
submodules: recursive
- name: 'Pull postgres 14.4 docker image so it is available for integeration test'
run: |
docker pull postgres:14.4
- name: 'Run integration tests and generage HTML coverage report'
run: |
make integration-test-cov
lint:
name: 'Linting tests'
runs-on: ubuntu-20.04
steps:
- name: 'Setup go ${{ env.GO_VERSION }}'
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: 'Check out project files'
uses: actions/checkout@v3
with:
submodules: false
- name: 'Run linting checks'
run: |
make test-lint