-
Notifications
You must be signed in to change notification settings - Fork 29
53 lines (46 loc) · 1.21 KB
/
check-lint.yaml
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
name: Check - lint
on:
pull_request:
types:
- assigned
- opened
- synchronize
- reopened
paths:
- "**.go"
- "**/go.mod"
- ".golangci.yaml"
jobs:
checklint:
name: Lint
# Only run this job if we're in the main repo, not a fork.
if: github.repository == 'deepgram/deepgram-go-sdk'
runs-on: ubuntu-latest
steps:
- name: Checkout code by commit
uses: actions/checkout@v4
- name: Set up Go 1.x
uses: actions/setup-go@v3
with:
go-version: "1.19"
id: go
# - name: Get Date
# id: get-date
# shell: bash
# run: |
# echo "date=$(date -u "+%Y-%m")" >> $GITHUB_OUTPUT
- name: Restore Lint Cache
uses: actions/cache@v3
timeout-minutes: 10
continue-on-error: true
with:
path: ${{ runner.temp }}/lint_cache
# key: ${{ runner.os }}-lint-cache-${{ steps.get-date.outputs.date }}
key: ${{ runner.os }}-lint-cache
restore-keys: |
${{ runner.os }}-lint-cache
- name: Run golangci-lint
env:
GOLANGCI_LINT_CACHE: ${{ runner.temp }}/lint_cache
run: |
make lint