-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: Added support for Go standard interfaces and CodeQL scanning. (
#34) - Added support for `fmt.Stringer`: Provides a string representation of the ID type. - Added support for `encoding.TextMarshaler`: Supports marshaling ID into a text-based representation. - Added support for `encoding.TextUnmarshaler`: Supports unmarshaling ID from a text-based representation. - Added support for `encoding.BinaryMarshaler`: Supports marshaling ID into a binary representation. - Added support for `encoding.BinaryUnmarshaler`: Supports unmarshaling ID from a binary representation. - Added `DefaultRandReader` to provide a default random reader for generating IDs. - Added `EmptyID` to provide an empty ID constant. - Added support for CodeQL analysis when pushing to the `main` branch.
- Loading branch information
Showing
7 changed files
with
511 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | ||
name: "CodeQL Analysis" | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
push: | ||
branches: | ||
- main | ||
|
||
paths-ignore: | ||
- 'CHANGELOG/**' | ||
- 'CODEOWNERS' | ||
- 'docs/**' | ||
- 'LICENSE' | ||
- '**/*.md' | ||
|
||
schedule: | ||
# * * * * * <command to execute> | ||
# | | | | | | ||
# | | | | day of the week (0–6) (Sunday to Saturday; | ||
# | | | month (1–12) 7 is also Sunday on some systems) | ||
# | | day of the month (1–31) | ||
# | hour (0–23) | ||
# minute (0–59) | ||
- cron: '0 0 * * 3' | ||
|
||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
include: | ||
- language: go | ||
|
||
permissions: | ||
security-events: write | ||
|
||
steps: | ||
- name: Preamble | ||
run: | | ||
whoami | ||
echo github ref $GITHUB_REF | ||
echo workflow $GITHUB_WORKFLOW | ||
echo home $HOME | ||
echo event name $GITHUB_EVENT_NAME | ||
echo workspace $GITHUB_WORKSPACE | ||
df -h | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get update | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common ca-certificates gnupg-agent curl build-essential make | ||
# Ref: https://github.com/actions/checkout | ||
- name: Checkout Source | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Ref: https://github.com/actions/setup-go | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
# Ref: https://github.com/github/codeql-action | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
build-mode: ${{ matrix.build-mode }} | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.