| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- - 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- - uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
- with:
- go-version: stable
- - uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
- - 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- with:
- fetch-depth: 0
- - name: Set up Python
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
- 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 }}
|