mirror of
https://github.com/pommee/goaway.git
synced 2026-05-02 14:39:39 -05:00
ci: pull request validation
This commit is contained in:
@@ -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/...
|
||||
Reference in New Issue
Block a user