forked from SAP/cgo-ase
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.53 KB
/
ci.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# SPDX-FileCopyrightText: 2020 SAP SE
# SPDX-FileCopyrightText: 2021 SAP SE
# SPDX-FileCopyrightText: 2022 SAP SE
# SPDX-FileCopyrightText: 2023 SAP SE
#
# SPDX-License-Identifier: Apache-2.0
---
name: CI
on:
push:
branches-ignore:
# Dependabot pushes are already run for the PR itself.
- 'dependabot/**'
pull_request: {}
workflow_dispatch: {}
jobs:
vulnerability-check:
runs-on: ubuntu-latest
steps:
# Setup go
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
# govulncheck
- name: Check for go vulnerabilities
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck -v -test ./...
generate-required:
runs-on: ubuntu-latest
steps:
# Setup stringer
- uses: actions/setup-go@v4
- run: go install golang.org/x/tools/cmd/stringer@latest
# Setup python and reuse
- uses: actions/setup-python@v4
- uses: BSFishy/pip-action@v1
with:
packages: reuse
# Generate
- uses: actions/checkout@v3
- run: PATH="$(go env GOPATH)/bin:$PATH" make generate
- run: |
if [ "$(git status --porcelain | wc -l)" -ne 0 ]; then
printf '::error ::%s' '`make generate` left or changed files'
git status
git diff
exit 1
fi
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fsfe/[email protected]