generated from michaelpeterswa/go-start
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 1.69 KB
/
pull_request.yml
File metadata and controls
78 lines (67 loc) · 1.69 KB
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
---
on: [pull_request] # yamllint disable-line rule:truthy
name: main
jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: npm install --save-dev @commitlint/{config-conventional,cli}
- run: npx commitlint --from=${{ github.event.pull_request.base.sha }}
golangci-lint:
strategy:
matrix:
go-version: [1.22.x]
os: [ubuntu-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v5.2.0
with:
version: v1.62.2
args: --timeout=5m --enable=bodyclose
yamllint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
hadolint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: hadolint/hadolint-action@v2.0.0
with:
dockerfile: Dockerfile
test:
strategy:
matrix:
go-version: [1.22.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Test
run: go test ./...