Bump golangci/golangci-lint-action from 3.7.0 to 4.0.0 #3
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
# SPDX-License-Identifier: Apache-2.0 | |
# Copyright 2024 Intel Corporation | |
name: Master workflow | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Build | |
run: go build -o build/_output/onos-mho ./cmd/onos-mho | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- uses: golangci/golangci-lint-action@v4.0.0 | |
with: | |
version: latest | |
args: -v --config ./.golangci.yml | |
unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Unit tests | |
run: | | |
go test -race github.com/onosproject/onos-mho/pkg/... | |
go test -race github.com/onosproject/onos-mho/cmd/... | |
docker-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Build Docker image | |
run: | | |
git clone https://github.com/onosproject/build-tools.git build/build-tools | |
go mod vendor | |
docker build . -f build/onos-mho/Dockerfile -t onosproject/onos-mho:latest | |
rm -rf vendor | |
license-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: reuse lint | |
uses: fsfe/reuse-action@v2 | |
fossa-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: FOSSA scan | |
uses: fossas/fossa-action@main | |
with: | |
api-key: ${{secrets.fossaApiKey}} |