Skip to content

Commit

Permalink
#213 add golangci-lint job to pull request check
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Tarbaev authored and wwoytenko committed Oct 28, 2024
1 parent 90fd77c commit f777856
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:

jobs:
build-binary:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
matrix:
platforms:
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
files: builds/*

build-docker-images-and-push:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:

jobs:
deploy-docs:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PR checks

on:
workflow_dispatch:
pull_request:
paths-ignore:
- 'README.md'
- 'docs/**'
- 'mkdocs.yml'
- 'LICENSE'
- 'getting_started.md'
- 'docker-compose.yml'
- 'playground/**'
- 'CNAME'
- 'requirements.txt'

env:
go-version: '1.23.2'
golangci-lint-version: v1.60

jobs:
tests:
uses: ./.github/workflows/tests.yml

build:
uses: ./.github/workflows/build.yml
needs:
- tests

lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.golangci-lint-version }}
9 changes: 1 addition & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
name: release
name: Create Greenmask release

on:
workflow_dispatch:
push:
tags:
- 'v*'
pull_request:
paths-ignore:
- 'README.md'
- 'docs/**'
- 'LICENSE'
- 'getting_started.md'

jobs:
tests:
Expand All @@ -23,7 +17,6 @@ jobs:

docs:
uses: ./.github/workflows/docs.yml
if: startsWith(github.ref, 'refs/tags/v')
needs:
- build

4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:

jobs:
unit-tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -22,7 +22,7 @@ jobs:
run: make tests

integration-tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs:
- unit-tests
steps:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/update_dev_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
paths:
- 'docs/**'

env:
python-version: 'pypy3.10'

jobs:
docs:
uses: ./.github/workflows/docs.yml

0 comments on commit f777856

Please sign in to comment.