Skip to content

Merge pull request #1799 from turetske/remove-tls-defer #84

Merge pull request #1799 from turetske/remove-tls-defer

Merge pull request #1799 from turetske/remove-tls-defer #84

name: Linter
on:
push:
tags:
- "*"
branches:
- master
- main
pull_request:
jobs:
go-linter:
name: linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: false
# We embed the contents of web_ui/frontend/out/* into the resulting binaries
# That particular directory should contain outputs generated by the
# npm build. However, to keep the runtime of the linter as fast as possible,
# instead of running `npm` here, we simply create a dummy empty file.
#
# If no dummy file exists, then the linters will flag the situation as
# an error.
- name: Generate placeholder files
id: generate-placeholder
run: |
go generate ./...
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
# We still run this so that we can get the nice hint of gofmt issues inline
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
prettier-linter:
name: prettier-linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Move to the web repository
run: |
cd web_ui/frontend
npm install
npm run format