Skip to content

Commit

Permalink
ci: add pr lint workflow (#3157)
Browse files Browse the repository at this point in the history
  • Loading branch information
o1egl committed Apr 24, 2024
1 parent 0e0b0c8 commit e39ea73
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/main.yaml
Expand Up @@ -26,19 +26,9 @@ jobs:
with:
go-version: 1.22.1
- run: make lint-backend
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: make lint-commits
lint:
runs-on: ubuntu-latest
needs: [lint-frontend, lint-backend, lint-commits]
needs: [lint-frontend, lint-backend]
steps:
- run: echo "done"

Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pr-lint.yaml
@@ -0,0 +1,21 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- reopened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -27,7 +27,7 @@ test-backend: ## Run backend tests
$Q $(go) test -v ./...

.PHONY: lint
lint: lint-frontend lint-backend lint-commits ## Run all linters
lint: lint-frontend lint-backend ## Run all linters

.PHONY: lint-frontend
lint-frontend: ## Run frontend linters
Expand Down

0 comments on commit e39ea73

Please sign in to comment.