-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
43 lines (41 loc) · 1.22 KB
/
Copy pathcode.yml
File metadata and controls
43 lines (41 loc) · 1.22 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
on:
pull_request:
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'COPYING'
- 'website/**'
- '.github/*.md'
- '.github/FUNDING.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
name: Validate Code
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ${{ github.workspace }}/src
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Install Go 🗳
uses: ./.github/workflows/composite/bootstrap-go
- name: Golang CI
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a
with:
working-directory: src
- name: Fieldalignment
run: |
go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
fieldalignment "./..."
- name: Modernize
run: |
go install golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest
modernize "./..."
- name: Unit Tests
run: go test "./..."