|
@@ -1,4 +1,9 @@
|
|
|
name: Lint
|
|
|
+
|
|
|
+concurrency:
|
|
|
+ group: lint-${{ github.event_name }}-${{ github.ref }}
|
|
|
+ cancel-in-progress: true
|
|
|
+
|
|
|
on:
|
|
|
pull_request:
|
|
|
types: [opened, edited, synchronize, reopened]
|
|
@@ -10,12 +15,9 @@ on:
|
|
|
- '.github/workflows/lint.yaml'
|
|
|
|
|
|
jobs:
|
|
|
-
|
|
|
- lint:
|
|
|
- name: Lint
|
|
|
+ check_licenses:
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
-
|
|
|
- name: Set up Go
|
|
|
uses: actions/setup-go@v4
|
|
|
with:
|
|
@@ -29,6 +31,19 @@ jobs:
|
|
|
go install github.com/google/go-licenses@latest
|
|
|
$(go env GOPATH)/bin/go-licenses check ./... --disallowed_types forbidden,restricted,unknown --ignore modernc.org/mathutil
|
|
|
|
|
|
+ golangci_lint:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ needs:
|
|
|
+ - check-licenses
|
|
|
+ steps:
|
|
|
+ - name: Set up Go
|
|
|
+ uses: actions/setup-go@v4
|
|
|
+ with:
|
|
|
+ go-version: '1.20'
|
|
|
+
|
|
|
+ - name: Check out code into the Go module directory
|
|
|
+ uses: actions/checkout@v3
|
|
|
+
|
|
|
- name: Install dependencies
|
|
|
env:
|
|
|
DEBIAN_FRONTEND: noninteractive
|