-
Notifications
You must be signed in to change notification settings - Fork 14
53 lines (44 loc) · 1.22 KB
/
static-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Static analysis
on:
workflow_dispatch:
pull_request:
branches:
- "master"
jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: cloudposse/github-action-pre-commit@v3
lint:
name: lint
permissions:
statuses: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`.
fetch-depth: 0
- name: Load the linter configuration
# Read the configuration file and exclude the comments.
run: sed '/^\s*#/d' .github/super-linter.env >> "${GITHUB_ENV}"
- name: Lint the code base
uses: github/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#####
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.19
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest