Fix AssessEvidence error log #6838
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
merge_group: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: | |
contents: read | |
pull-requests: read | |
checks: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: Install buf | |
uses: bufbuild/buf-setup-action@v1.31.0 | |
with: | |
github_token: ${{ github.token }} | |
- name: Generate | |
run: | | |
go install \ | |
github.com/srikrsna/protoc-gen-gotag \ | |
github.com/oxisto/owl2proto/cmd/owl2proto | |
go generate ./... | |
- name: Build | |
run: | | |
mkdir -p build | |
go build -ldflags="-X clouditor.io/clouditor/v2/service.version=$(git describe --exact-match --tags --abbrev=0)" -o build ./cmd/engine | |
go build -ldflags="-X clouditor.io/clouditor/v2/service.version=$(git describe --exact-match --tags --abbrev=0)" -o build ./cmd/cli | |
- name: Test | |
run: | | |
go install github.com/mfridman/tparse@latest | |
go test -v -coverprofile=coverage.cov -coverpkg ./... -covermode=atomic ./... -json | tee output.json | tparse -follow || true | |
tparse -format markdown -file output.json > $GITHUB_STEP_SUMMARY | |
- uses: codecov/codecov-action@v4 | |
with: | |
files: coverage.cov | |
flags: unittests | |
token: ${{ secrets.CODECOV_TOKEN }} # not needed, but seems to be more reliable | |
- name: "Upload Artifact" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: build | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
cache: false | |
- name: Lint | |
uses: golangci/golangci-lint-action@v5 | |
with: | |
version: v1.54 | |
args: --timeout=10m | |
- name: Check for forbidden licenses | |
run: | | |
go install github.com/Bobgy/go-licenses/v2@v2.0.0-dev.0 | |
go-licenses csv ./... | tee licenses.txt | |
! cat licenses.txt | grep "GPL" | |
- name: Check for Missing Copyright Header | |
run: | | |
go install github.com/google/addlicense | |
addlicense -c "Fraunhofer AISEC" -l apache -check **/**.go |