Skip to content

set-constant: Bind functions to their original context when finishing… #284

set-constant: Bind functions to their original context when finishing…

set-constant: Bind functions to their original context when finishing… #284

Workflow file for this run

name: Lint
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
# These permissions are required by golangci-lint to create annotations for PRs.
# https://github.com/golangci/golangci-lint-action?tab=readme-ov-file
contents: read
pull-requests: read
checks: write
jobs:
lint-go:
name: Lint Go (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- name: Run go version
run: go version
- name: Create placeholder asset
# go:embed in main.go requires the directory to exist and be non-empty
run: |
mkdir -p frontend/dist
touch frontend/dist/placeholder
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.62
- name: Run govulncheck
uses: golang/govulncheck-action@v1
lint-frontend:
name: Lint Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version-file: frontend/package.json
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Run node --version
run: node --version
- name: Set up Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install frontend dependencies
run: npm ci
working-directory: frontend
- name: Run frontend linter
run: task frontend:lint