| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- name: Linters
- permissions: read-all
- on:
- pull_request:
- branches:
- - main
- workflow_dispatch:
- jobs:
- jshint:
- name: Javascript Linter
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v5
- - name: Install linters
- run: |
- sudo npm install -g jshint@2.13.6 eslint@8.57.0
- - name: Run jshint
- run: jshint internal/ui/static/js/*.js
- - name: Run ESLint
- run: eslint internal/ui/static/js/*.js
- golangci:
- name: Golang Linters
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v5
- - uses: actions/setup-go@v6
- with:
- go-version: stable
- - uses: golangci/golangci-lint-action@v8
- with:
- args: >
- --timeout 10m
- --disable errcheck
- --enable sqlclosecheck,misspell,whitespace,gocritic
- - name: Run gofmt linter
- run: gofmt -d -e .
- commitlint:
- if: github.event_name == 'pull_request'
- name: Commit Linter
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v5
- with:
- fetch-depth: 0
- - name: Set up Python
- uses: actions/setup-python@v6
- with:
- python-version: '3.13'
- - name: Validate PR commits
- run: python3 .github/workflows/scripts/commit-checker.py --base ${{ github.event.pull_request.base.sha }} --head ${{ github.event.pull_request.head.sha }}
|