forked from pact-im/go-pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.04 KB
/
lint.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
name: Lint
on:
push:
pull_request:
workflow_dispatch:
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.0.2
- name: Set up Go
uses: ./.github/actions/setup-go-with-cache
- name: Set up golangci-lint
uses: ./.github/actions/setup-golangci-lint
- name: Run golangci-lint
run: |
golangci-lint run --out-format=github-actions -- \
$(go work edit -json | jq -c -r '[.Use[].DiskPath] | map_values(. + "/...")[]')
commitlint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.0.2
with:
fetch-depth: 0
- name: Create config
run: |
cat >commitlint.config.js <<EOF
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [0],
},
}
EOF
- name: Run commitlint
uses: wagoid/commitlint-github-action@v4.1.12