mirror of
https://github.com/foomo/keel.git
synced 2025-10-16 12:35:34 +00:00
chore: update github workflow
This commit is contained in:
parent
07f0c394d5
commit
9473fa3dcb
10
.github/workflows/release.yml
vendored
10
.github/workflows/release.yml
vendored
@ -6,15 +6,14 @@ on:
|
||||
- v*.*.*
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
GOPROXY: https://proxy.golang.org
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
@ -22,8 +21,7 @@ jobs:
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
check-latest: true
|
||||
go-version-file: 'go.mod'
|
||||
go-version-file: 'stable'
|
||||
|
||||
- uses: goreleaser/goreleaser-action@v4
|
||||
with:
|
||||
|
||||
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@ -4,15 +4,8 @@ on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
merge_group:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GOFLAGS: -mod=readonly
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
@ -21,15 +14,23 @@ jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
check-latest: true
|
||||
go-version-file: 'go.mod'
|
||||
go-version-file: 'stable'
|
||||
|
||||
- uses: gotesttools/gotestfmt-action@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: latest
|
||||
|
||||
- name: Run tests
|
||||
run: go test -v ./...
|
||||
- run: make test
|
||||
|
||||
- uses: coverallsapp/github-action@v2
|
||||
with:
|
||||
file: coverage.out
|
||||
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
.*
|
||||
*.log
|
||||
*.out
|
||||
!.github/
|
||||
!.husky/
|
||||
!.editorconfig
|
||||
@ -7,6 +8,4 @@
|
||||
!.golangci.yml
|
||||
!.goreleaser.yml
|
||||
!.husky.yaml
|
||||
/coverage.out
|
||||
/coverage.html
|
||||
/tmp/
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
run:
|
||||
timeout: 5m
|
||||
skip-dirs:
|
||||
- tmp
|
||||
|
||||
linters-settings:
|
||||
# https://golangci-lint.run/usage/linters/#revive
|
||||
|
||||
@ -2,33 +2,4 @@ builds:
|
||||
- skip: true
|
||||
|
||||
changelog:
|
||||
filters:
|
||||
exclude:
|
||||
- "^wip"
|
||||
- "^test"
|
||||
- "^docs"
|
||||
- "^chore"
|
||||
- "^style"
|
||||
- "go mod tidy"
|
||||
- "merge conflict"
|
||||
- "Merge pull request"
|
||||
- "Merge remote-tracking branch"
|
||||
- "Merge branch"
|
||||
groups:
|
||||
- title: Features
|
||||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
||||
order: 0
|
||||
- title: Dependency updates
|
||||
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
|
||||
order: 100
|
||||
- title: "Bug fixes"
|
||||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
||||
order: 150
|
||||
- title: "Security"
|
||||
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
|
||||
order: 200
|
||||
- title: "Performace"
|
||||
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
|
||||
order: 250
|
||||
- title: Other
|
||||
order: 999
|
||||
use: github-native
|
||||
|
||||
@ -9,9 +9,7 @@ hooks:
|
||||
lint-staged:
|
||||
'*.go':
|
||||
- goimports -l -w
|
||||
- gofmt -l -w
|
||||
|
||||
lint-commit:
|
||||
email: '^(.+@bestbytes.com)$'
|
||||
types: '^(feat|fix|build|chore|docs|perf|refactor|revert|style|test|wip)$'
|
||||
header: '^(?P<type>\w+)(\((?P<scope>[\w/.-]+)\))?(?P<breaking>!)?:( +)?(?P<header>.+)'
|
||||
|
||||
9
Makefile
9
Makefile
@ -27,14 +27,7 @@ doc:
|
||||
.PHONY: test
|
||||
## Run tests
|
||||
test:
|
||||
@go test -v ./...
|
||||
|
||||
.PHONY: test.cover
|
||||
## Run tests with coverage
|
||||
test.cover:
|
||||
@go test -v -coverprofile=coverage.out ./...
|
||||
@go tool cover -func=coverage.out
|
||||
@go tool cover -html=coverage.out
|
||||
@go test -coverprofile=coverage.out -race -json ./... | gotestfmt
|
||||
|
||||
.PHONY: lint
|
||||
## Run linter
|
||||
|
||||
Loading…
Reference in New Issue
Block a user