Skip to content

Commit 2139e90

Browse files
committed
ci: add github workflows
Signed-off-by: Christian Stewart <christian@aperture.us>
1 parent c5489c4 commit 2139e90

File tree

4 files changed

+116
-0
lines changed

4 files changed

+116
-0
lines changed

.github/renovate.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
":semanticPrefixFixDepsChoreOthers",
5+
":ignoreModulesAndTests",
6+
"group:all",
7+
"workarounds:all"
8+
],
9+
"forkProcessing": "enabled",
10+
"branchConcurrentLimit": 0,
11+
"packageRules": [
12+
{
13+
"matchManagers": ["gomod"],
14+
"matchDepTypes": ["replace"],
15+
"enabled": false
16+
}
17+
]
18+
}

.github/workflows/codeql-analysis.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ "master" ]
9+
schedule:
10+
- cron: '41 13 * * 6'
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
language: [ 'go' ]
28+
go: ['1.22']
29+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
30+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
31+
32+
steps:
33+
- name: Checkout repository
34+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
35+
36+
- name: Setup Go ${{ matrix.go }}
37+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
38+
with:
39+
go-version: ${{ matrix.go }}
40+
41+
- name: Initialize CodeQL
42+
uses: github/codeql-action/init@8f596b4ae3cb3c588a5c46780b86dd53fef16c52 # v3.25.2
43+
with:
44+
languages: ${{ matrix.language }}
45+
46+
- name: Build Go
47+
run: go build -mod=readonly -v ./...
48+
49+
- name: Perform CodeQL Analysis
50+
uses: github/codeql-action/analyze@8f596b4ae3cb3c588a5c46780b86dd53fef16c52 # v3.25.2
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
4+
#
5+
# Source repository: https://github.com/actions/dependency-review-action
6+
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
7+
name: 'Dependency Review'
8+
on: [pull_request]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
dependency-review:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Checkout Repository'
18+
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
19+
- name: 'Dependency Review'
20+
uses: actions/dependency-review-action@5bbc3ba658137598168acb2ab73b21c432dd411b # v4.2.5

.github/workflows/tests.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ "master" ]
9+
10+
# Builds images for target boards.
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
tests:
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
go: ['1.22']
20+
timeout-minutes: 10
21+
steps:
22+
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
23+
- name: Setup Go ${{ matrix.go }}
24+
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
25+
with:
26+
go-version: ${{ matrix.go }}
27+
- name: Test Go
28+
run: go test -v ./...

0 commit comments

Comments
 (0)