-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (75 loc) · 2.11 KB
/
pull_request.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Pull Request
on:
push:
branches-ignore: [main]
env:
GO_VERSION: "1.23"
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/[email protected]
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
id: go
- name: "Get dependencies"
id: dependencies
run: |
go get
- name: Go Tests
run: |
mkdir -p tests/data
make tests-coverage
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/[email protected]
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
id: go
- name: "Get dependencies"
id: dependencies
run: |
go get
- name: Run golangci-lint
uses: golangci/[email protected]
with:
args: --verbose --timeout=2m
compile:
name: Compile validation
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/[email protected]
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
id: go
- name: "Get dependencies"
id: dependencies
run: |
go get
- name: build & execute
run: |
go build -ldflags="-X 'github.com/karl-cardenas-coding/mywhoop/cmd.VersionString=1.0.0'" -o=mywhoop -v
./mywhoop