Skip to content

Update copyright headers #77

Update copyright headers

Update copyright headers #77

Workflow file for this run

# 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:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3.3.0
with:
go-version-file: 'go.mod'
- run: go mod tidy -v
- uses: golangci/golangci-lint-action@v3.2.0
with:
version: v1.48
# github.head_ref is only set on pull_request runs, not for
# tags or branches.
# For commits on branches and tags all issues are reported, but
# PR runs only report new issues introduced in the PR.
only-new-issues: ${{ github.head_ref != '' }}
- 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 go and stringer
- run: go install -v 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
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
make test
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fsfe/reuse-action@v1.1