ci: pull request validation

This commit is contained in:
pommee
2025-09-27 10:59:08 +02:00
parent 7b6f446615
commit 4209a6a4df
+52
View File
@@ -0,0 +1,52 @@
name: Pull Request Validation
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
run: pnpm -C ./client install --frozen-lockfile
- name: Commit lint
run: pnpm -C ./client exec commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }}
- name: ESLint
run: pnpm -C ./client exec eslint
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25.1"
- name: Golangci-lint
uses: golangci/golangci-lint-action@v8.0.0
with:
working-directory: ./backend
- name: Go tests
run: go test -count=1 ./test/...