Run lint after tests instead of separate workflow (#2103)
This commit is contained in:
parent
e63a3ab92b
commit
137e7408fd
1
.github/workflows/bats-hub.yml
vendored
1
.github/workflows/bats-hub.yml
vendored
|
@ -31,7 +31,6 @@ jobs:
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
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
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
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
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
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
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: "Check out CrowdSec repository"
|
- name: "Check out CrowdSec repository"
|
||||||
uses: actions/checkout@v3
|
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
|
- windows/installer/*.wxs
|
||||||
- .github/workflows/ci-windows-build-msi.yml
|
- .github/workflows/ci-windows-build-msi.yml
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -35,7 +34,6 @@ jobs:
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
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
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out CrowdSec repository
|
- name: Check out CrowdSec repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -69,3 +68,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
files: coverage.out
|
files: coverage.out
|
||||||
flags: unit-windows
|
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
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out CrowdSec repository
|
- name: Check out CrowdSec repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -153,3 +152,10 @@ jobs:
|
||||||
with:
|
with:
|
||||||
files: coverage.out
|
files: coverage.out
|
||||||
flags: unit-linux
|
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
|
name: Build and upload binary package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: "Set up Go ${{ matrix.go-version }}"
|
- name: "Set up Go ${{ matrix.go-version }}"
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
@ -51,6 +52,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: ["1.20.1"]
|
go-version: ["1.20.1"]
|
||||||
|
|
||||||
name: Build and upload binary package
|
name: Build and upload binary package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -59,6 +61,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go-version }}
|
go-version: ${{ matrix.go-version }}
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
@ -81,6 +84,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
make release BUILD_STATIC=yes
|
make release BUILD_STATIC=yes
|
||||||
mv crowdsec-release.tgz crowdsec-release-static.tgz
|
mv crowdsec-release.tgz crowdsec-release-static.tgz
|
||||||
|
|
||||||
- name: Upload to release
|
- name: Upload to release
|
||||||
uses: JasonEtco/upload-to-release@master
|
uses: JasonEtco/upload-to-release@master
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue