Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions workflow-templates/dev-commit-lint.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Commit Lint",
"description": "Commit Lint Workflow"
}
17 changes: 17 additions & 0 deletions workflow-templates/dev-commit-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Commit Lint
on:
pull_request:

jobs:
commitlint:
name: commit-lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: commitlint
uses: wagoid/commitlint-github-action@v4
with:
configFile: "./.commitlintrc.yml"
10 changes: 10 additions & 0 deletions workflow-templates/dev-kube-lint.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "Kubernetes Lint",
"description": "Kubernetes Lint Workflow",
"categories": [
"Kubernetes"
],
"filePatterns": [
"deployments/*"
]
}
17 changes: 17 additions & 0 deletions workflow-templates/dev-kube-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Kube Lint
on:
pull_request:
paths:
- deployments/*

jobs:
kube-linter:
name: chart-lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Scan repo with kube-linter
uses: stackrox/kube-linter-action@v1.0.4
with:
directory: deployments
11 changes: 11 additions & 0 deletions workflow-templates/go-test.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "Go Test",
"description": "Go Test Workflow",
"iconName": "gopher",
"categories": [
"Go"
],
"filePatterns": [
".*\\.go$"
]
}
41 changes: 41 additions & 0 deletions workflow-templates/go-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Go Test
on:
pull_request:

jobs:
go-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.19.x
- name: Go mod cache
id: go-cache
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
vendor
key: ${{ runner.os }}-go-${{ hashFiles('**/go.*') }}
restore-keys: |
${{ runner.os }}-go-
- name: Go mod vendor
if: steps.go-cache.outputs.cache-hit != 'true'
env:
GOPRIVATE: "github.com/encodium"
run: |
echo "machine github.com login rp-build-user password ${{ secrets.CLONE_PAT }}" > ~/.netrc
go mod vendor
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.45.2
skip-go-installation: true
args: --print-issued-lines=true -c ./.golangci.yml --max-same-issues 0 -v --timeout 5m
- name: Go test
run: |
go test ./... -mod=vendor -cover -coverprofile coverage.out -coverpkg ./...
GOFLAGS=-mod=vendor go tool cover -func=coverage.out
238 changes: 238 additions & 0 deletions workflow-templates/gopher.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.