Run lint after tests instead of separate workflow (#2103)
This commit is contained in:
parent
e63a3ab92b
commit
137e7408fd
9 changed files with 19 additions and 47 deletions
1
.github/workflows/bats-hub.yml
vendored
1
.github/workflows/bats-hub.yml
vendored
|
@ -31,7 +31,6 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: "Check out CrowdSec repository"
|
||||
uses: actions/checkout@v3
|
||||
|
|
1
.github/workflows/bats-mysql.yml
vendored
1
.github/workflows/bats-mysql.yml
vendored
|
@ -38,7 +38,6 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: "Check out CrowdSec repository"
|
||||
uses: actions/checkout@v3
|
||||
|
|
1
.github/workflows/bats-postgres.yml
vendored
1
.github/workflows/bats-postgres.yml
vendored
|
@ -39,7 +39,6 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: "Check out CrowdSec repository"
|
||||
uses: actions/checkout@v3
|
||||
|
|
1
.github/workflows/bats-sqlite-coverage.yml
vendored
1
.github/workflows/bats-sqlite-coverage.yml
vendored
|
@ -28,7 +28,6 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: "Check out CrowdSec repository"
|
||||
uses: actions/checkout@v3
|
||||
|
|
2
.github/workflows/ci-windows-build-msi.yml
vendored
2
.github/workflows/ci-windows-build-msi.yml
vendored
|
@ -19,7 +19,6 @@ on:
|
|||
- windows/installer/*.wxs
|
||||
- .github/workflows/ci-windows-build-msi.yml
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
|
@ -35,7 +34,6 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
|
|
38
.github/workflows/ci_golangci-lint.yml
vendored
38
.github/workflows/ci_golangci-lint.yml
vendored
|
@ -1,38 +0,0 @@
|
|||
name: golangci-lint
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- master
|
||||
- releases/**
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'README.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'mkdocs.yml'
|
||||
- 'README.md'
|
||||
jobs:
|
||||
golangci:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-2022]
|
||||
name: lint
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Set up Go 1.20
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.20.1
|
||||
id: go
|
||||
- uses: actions/checkout@v3
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.51
|
||||
args: --issues-exit-code=1 --timeout 10m
|
||||
only-new-issues: false
|
8
.github/workflows/go-tests-windows.yml
vendored
8
.github/workflows/go-tests-windows.yml
vendored
|
@ -33,7 +33,6 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: Check out CrowdSec repository
|
||||
uses: actions/checkout@v3
|
||||
|
@ -69,3 +68,10 @@ jobs:
|
|||
with:
|
||||
files: coverage.out
|
||||
flags: unit-windows
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.51
|
||||
args: --issues-exit-code=1 --timeout 10m
|
||||
only-new-issues: false
|
||||
|
|
8
.github/workflows/go-tests.yml
vendored
8
.github/workflows/go-tests.yml
vendored
|
@ -114,7 +114,6 @@ jobs:
|
|||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: Check out CrowdSec repository
|
||||
uses: actions/checkout@v3
|
||||
|
@ -153,3 +152,10 @@ jobs:
|
|||
with:
|
||||
files: coverage.out
|
||||
flags: unit-linux
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.51
|
||||
args: --issues-exit-code=1 --timeout 10m
|
||||
only-new-issues: false
|
||||
|
|
|
@ -15,11 +15,12 @@ jobs:
|
|||
name: Build and upload binary package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: "Set up Go ${{ matrix.go-version }}"
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -51,6 +52,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
go-version: ["1.20.1"]
|
||||
|
||||
name: Build and upload binary package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -59,6 +61,7 @@ jobs:
|
|||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -81,6 +84,7 @@ jobs:
|
|||
run: |
|
||||
make release BUILD_STATIC=yes
|
||||
mv crowdsec-release.tgz crowdsec-release-static.tgz
|
||||
|
||||
- name: Upload to release
|
||||
uses: JasonEtco/upload-to-release@master
|
||||
with:
|
||||
|
|
Loading…
Reference in a new issue