1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 11:36:46 +00:00

ci/cd: add basic static analysis for backend (#389)

This commit is contained in:
Rich
2025-03-27 08:13:56 -07:00
committed by GitHub
parent 4d049bbe24
commit 4ac1196d8d
8 changed files with 67 additions and 9 deletions

36
.github/workflows/backend-linter.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Run Backend Linter
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
# Required: allow read access to the content for analysis.
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
# Optional: allow write access to checks to allow the action to annotate code in the PR.
checks: write
jobs:
golangci-lint:
name: Run Golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: backend/go.mod
- name: Run Golangci-lint
uses: golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
with:
version: v1.64
working-directory: backend
only-new-issues: ${{ github.event_name == 'pull_request' }}