1
0
Fork 0
mirror of https://github.com/kastenhq/kubestr.git synced 2024-12-14 11:57:56 +00:00
kastenhq-kubestr/.github/workflows/ci.yml

58 lines
1.3 KiB
YAML
Raw Normal View History

name: CI
2020-11-25 19:52:37 +00:00
on:
push:
branches:
- main
- master
tags:
- v*
2020-11-25 19:52:37 +00:00
pull_request:
permissions:
contents: read
2020-11-25 19:52:37 +00:00
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
-
name: Check out code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
-
name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: 'go.mod'
id: go
-
name: Build
run: go build -v .
-
name: Test
run: go test -v ./...
lint:
name: Lint
2020-11-25 19:52:37 +00:00
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
-
name: Set up Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: 'go.mod'
-
name: golangci-lint
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
2020-11-25 19:52:37 +00:00
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.54.2
args: --timeout=5m --modules-download-mode=mod
skip-pkg-cache: true