-
-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (60 loc) · 1.56 KB
/
codeql.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
54
55
56
57
58
59
60
61
62
name: Run CodeQL
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '11 0 * * 5'
workflow_dispatch:
jobs:
analyze:
permissions:
security-events: write
actions: read
contents: read
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install build dependencies
id: install_packages
run: >
sudo apt-get update && sudo apt-get -y install
desktop-file-utils gcc
libgl1-mesa-dev xserver-xorg-dev
libxcursor-dev libxrandr-dev
libxinerama-dev libxi-dev
libgl1-mesa-dev libxxf86vm-dev
> ${RUNNER_TEMP}/dpkg.log
env:
DEBIAN_FRONTEND: noninteractive
- name: Setup Go
id: setup_go
uses: actions/setup-go@v5
with:
go-version: '^1.22'
- name: Install Go dependencies
id: install_go_deps
run: |
go install golang.org/x/tools/cmd/stringer@latest
go install golang.org/x/text/cmd/gotext@latest
go install github.com/matryer/moq@latest
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Run go generate
id: go_generate
run: go generate -v ./...
- name: Run go build
id: go_build
run: go build -v
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3