Skip to content

ci: 💚 fix a linter error #72

ci: 💚 fix a linter error

ci: 💚 fix a linter error #72

Workflow file for this run

name: Go OVP8xx package
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: v1.53
test:
runs-on: ubuntu-latest
needs: lint
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
with:
lfs: 'true'
- name: 👷 Prepare the Go environment
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: 🧪 Run the unit tests
run: go test -v -failfast -coverprofile cover.out -timeout=1m ./...
- name: 🚀 Upload the coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Install dependencies
run: go get -d ./...
- name: Build
run: go build -v ./...
- name: Build the CLI
run: go build cmd/ovp8xx/ovp8xx.go
release:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: go-semantic-release/action@v1
with:
hooks: goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}