Skip to content

Commit 8d49342

Browse files
authored
Merge pull request #9 from jakec-dev/develop
Move to TBD workflow
2 parents ecb5520 + 7ff68e4 commit 8d49342

File tree

18 files changed

+1056
-1
lines changed

18 files changed

+1056
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.go text eol=lf

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
- package-ecosystem: "gomod"
9+
directory: "/"
10+
schedule:
11+
interval: "weekly"

.github/workflows/scorecard.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# This workflow uses actions that are not certified by GitHub. They are provided
2+
# by a third-party and are governed by separate terms of service, privacy
3+
# policy, and support documentation.
4+
5+
name: Scorecard supply-chain security
6+
on:
7+
# For Branch-Protection check. Only the default branch is supported. See
8+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9+
branch_protection_rule:
10+
# To guarantee Maintained check is occasionally updated. See
11+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12+
schedule:
13+
- cron: '44 21 * * 4'
14+
push:
15+
branches: [ "master" ]
16+
17+
# Declare default permissions as read only.
18+
permissions: read-all
19+
20+
jobs:
21+
analysis:
22+
name: Scorecard analysis
23+
runs-on: ubuntu-latest
24+
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
25+
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
26+
permissions:
27+
# Needed to upload the results to code-scanning dashboard.
28+
security-events: write
29+
# Needed to publish results and get a badge (see publish_results below).
30+
id-token: write
31+
# Uncomment the permissions below if installing in a private repository.
32+
# contents: read
33+
# actions: read
34+
35+
steps:
36+
- name: "Checkout code"
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
with:
39+
persist-credentials: false
40+
41+
- name: "Run analysis"
42+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
43+
with:
44+
results_file: results.sarif
45+
results_format: sarif
46+
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
47+
# - you want to enable the Branch-Protection check on a *public* repository, or
48+
# - you are installing Scorecard on a *private* repository
49+
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
50+
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
51+
52+
# Public repositories:
53+
# - Publish results to OpenSSF REST API for easy access by consumers
54+
# - Allows the repository to include the Scorecard badge.
55+
# - See https://github.com/ossf/scorecard-action#publishing-results.
56+
# For private repositories:
57+
# - `publish_results` will always be set to `false`, regardless
58+
# of the value entered here.
59+
publish_results: true
60+
61+
# (Optional) Uncomment file_mode if you have a .gitattributes with files marked export-ignore
62+
# file_mode: git
63+
64+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
65+
# format to the repository Actions tab.
66+
- name: "Upload artifact"
67+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
68+
with:
69+
name: SARIF file
70+
path: results.sarif
71+
retention-days: 5
72+
73+
# Upload the results to GitHub's code scanning dashboard (optional).
74+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
75+
- name: "Upload to code-scanning"
76+
uses: github/codeql-action/upload-sarif@v3
77+
with:
78+
sarif_file: results.sarif

.github/workflows/workflow.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI Workflow
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
- master
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
go-version: ['1.24.3']
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: ${{ matrix.go-version }}
22+
cache: true
23+
24+
- name: Display Go version
25+
run: go version
26+
27+
- name: Set up golangci-lint
28+
uses: golangci/golangci-lint-action@v8
29+
with:
30+
version: v2.1
31+
32+
- name: Run linting
33+
run: make lint
34+
35+
- name: Run tests
36+
run: make test
37+
38+
- name: Run audit checks
39+
run: make audit
40+
41+
- name: Verify build
42+
run: make build
43+
44+
- name: Upload coverage
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: coverage-${{ matrix.go-version }}
48+
path: coverage.html

.gitignore

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#################
2+
## Common
3+
#################
4+
5+
# env files
6+
.env
7+
.env.development.local
8+
.env.test.local
9+
.env.production.local
10+
.env.local
11+
12+
# Editor/IDE
13+
.idea/
14+
.vscode/
15+
.vscode-test
16+
17+
# AI
18+
.claude/
19+
CLAUDE.md
20+
.roo/
21+
.rooignore
22+
.roorules
23+
24+
# TEMP: Project planning documents
25+
docs/tasks/
26+
27+
#################
28+
## GoLang
29+
#################
30+
31+
# Build dir
32+
bin/
33+
34+
# goreleaser
35+
dist/
36+
37+
# Binaries for programs and plugins
38+
*.exe
39+
*.exe~
40+
*.dll
41+
*.so
42+
*.dylib
43+
44+
# Test binary, built with `go test -c`
45+
*.test
46+
47+
# Code coverage profiles and other test artifacts
48+
*.out
49+
coverage.*
50+
*.coverprofile
51+
profile.cov
52+
53+
# Go workspace file
54+
go.work
55+
go.work.sum
56+
57+
#################
58+
## Node.js
59+
#################
60+
61+
# Logs
62+
logs
63+
*.log
64+
.pnpm-debug.log*
65+
66+
# Diagnostic reports (https://nodejs.org/api/report.html)
67+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
68+
69+
# Runtime data
70+
pids
71+
*.pid
72+
*.seed
73+
*.pid.lock
74+
75+
# Compiled binary addons (https://nodejs.org/api/addons.html)
76+
build/Release
77+
78+
# Dependency directories
79+
node_modules/
80+
81+
# TypeScript cache
82+
*.tsbuildinfo
83+
84+
# Optional eslint cache
85+
.eslintcache
86+
87+
# Optional REPL history
88+
.node_repl_history
89+
90+
# Output of 'npm pack'
91+
*.tgz

0 commit comments

Comments
 (0)