-
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.12 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
41
42
43
44
45
46
47
48
49
50
# GitHub Actions workflow to lint the locale files.
name: "Lint"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
merge_group:
concurrency:
group: "${{ github.workflow }}-${{ github.event.number || github.ref }}"
cancel-in-progress: "${{ github.event.action != 'merge_group' }}"
permissions:
contents: read
jobs:
lint:
name: "Lint"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout repository"
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 0
submodules: true
- name: "Setup Go stable"
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: "stable"
cache: true
check-latest: true
- name: "Download dependencies"
run: go mod download
- name: "Verify dependencies"
run: go mod verify
- name: "Build"
run: go build -v ./...
- name: "Test"
run: go test -race -v ./...
- name: "Lint"
run: |
go build -trimpath ./cmd/lang-lint
./lang-lint