ci: run eslint

This commit is contained in:
Tulir Asokan 2024-10-07 01:29:29 +03:00
parent 0cb2fb88cb
commit 758e3e9086
2 changed files with 21 additions and 3 deletions

View file

@ -6,7 +6,6 @@ jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: ["1.22", "1.23"]
name: Lint and test ${{ matrix.go-version == '1.23' && '(latest)' || '(old)' }}
@ -25,7 +24,6 @@ jobs:
sudo apt-get install libolm-dev libolm3
go install golang.org/x/tools/cmd/goimports@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
pip install pre-commit
export PATH="$HOME/go/bin:$PATH"
mkdir -p web/dist
touch web/dist/empty
@ -34,7 +32,7 @@ jobs:
run: go build -v ./...
- name: Lint
run: pre-commit run -a
uses: pre-commit/action@v3.0.1
- name: Test
run: go test -v ./...

20
.github/workflows/js.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: JS
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
name: Lint
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: npm install --dev --legacy-peer-deps
- name: Run ESLint
run: eslint ./src