| 1 |
name: Go |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
permissions: |
| 6 |
contents: read |
| 7 |
|
| 8 |
jobs: |
| 9 |
|
| 10 |
analyze: |
| 11 |
name: Analyze |
| 12 |
runs-on: ubuntu-latest |
| 13 |
|
| 14 |
permissions: |
| 15 |
actions: read |
| 16 |
contents: read |
| 17 |
security-events: write |
| 18 |
|
| 19 |
strategy: |
| 20 |
fail-fast: false |
| 21 |
matrix: |
| 22 |
language: ["go"] |
| 23 |
|
| 24 |
steps: |
| 25 |
- name: Checkout repository |
| 26 |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 27 |
|
| 28 |
- name: Initialize CodeQL |
| 29 |
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11 |
| 30 |
with: |
| 31 |
languages: ${{ matrix.language }} |
| 32 |
|
| 33 |
- name: Autobuild |
| 34 |
uses: github/codeql-action/autobuild@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11 |
| 35 |
|
| 36 |
- name: Perform CodeQL Analysis |
| 37 |
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11 |
| 38 |
with: |
| 39 |
category: "/language:${{matrix.language}}" |
| 40 |
|
| 41 |
build: |
| 42 |
name: Build |
| 43 |
runs-on: ubuntu-latest |
| 44 |
|
| 45 |
strategy: |
| 46 |
matrix: |
| 47 |
go-version: [ '1.23', '1.25.x' ] |
| 48 |
|
| 49 |
steps: |
| 50 |
- name: Checkout repository |
| 51 |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 52 |
|
| 53 |
- name: Setup Go ${{ matrix.go-version }} |
| 54 |
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 |
| 55 |
with: |
| 56 |
go-version: ${{ matrix.go-version }} |
| 57 |
|
| 58 |
- name: Build |
| 59 |
run: go build -v ./... |
| 60 |
|
| 61 |
- name: Test |
| 62 |
run: go test -v ./... |