-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (37 loc) · 949 Bytes
/
lint-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
name: "Lint & Test PR"
on:
pull_request:
branches:
- master
- main
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
# pull-requests: read
jobs:
golangci-lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
golangci-test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up golang
uses: actions/setup-go@v2
with:
go-version: 1.22
- name: golangci-test
run: go test ./... -coverprofile=profile.cov -cover