Debian Codegraph @

.github/workflows/verify.yml

raw
1 #
2 # Copyright 2021 The Sigstore Authors.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 name: verify
17
18 on:
19 push:
20 branches:
21 - main
22 pull_request:
23 branches:
24 - main
25
26 permissions: {}
27
28 jobs:
29 license-check:
30 name: license boilerplate check
31 runs-on: ubuntu-latest
32
33 permissions:
34 contents: read
35
36 steps:
37 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
38 with:
39 persist-credentials: false
40 - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
41 with:
42 go-version-file: './go.mod'
43 check-latest: true
44 cache: false
45 - name: Install addlicense
46 run: go install github.com/google/[email protected]
47 - name: Check license headers
48 run: |
49 set -e
50 addlicense -l apache -c 'The Sigstore Authors' -v *
51 git diff --exit-code
52
53 golangci:
54 name: lint checks
55 runs-on: ubuntu-latest
56
57 permissions:
58 contents: read # for actions/checkout to fetch code
59 pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
60
61 strategy:
62 fail-fast: false
63 matrix:
64 module:
65 - ./
66 - pkg/signature/kms/aws
67 - pkg/signature/kms/azure
68 - pkg/signature/kms/gcp
69 - pkg/signature/kms/hashivault
70
71 steps:
72 - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
73 with:
74 persist-credentials: false
75 - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
76 with:
77 go-version-file: ${{ matrix.module }}/go.mod
78 check-latest: true
79 cache: false
80 - name: golangci-lint
81 uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
82 with:
83 version: v2.12
84 working-directory: ${{ matrix.module }}