Skip to content

Conversation

@EDsCODE
Copy link
Contributor

@EDsCODE EDsCODE commented Dec 12, 2025

Summary

  • Add GitHub Actions CI workflow that runs on pushes to main and pull requests
  • Runs go test -v ./... to execute all tests
  • Verifies the build succeeds with go build

Test plan

  • CI workflow will run on this PR itself to verify it works

🤖 Generated with Claude Code

Run Go tests on pushes to main and pull requests. Also verifies
the build succeeds.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comment on lines +13 to +28
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run tests
run: go test -v ./...

- name: Build
run: go build -o duckgres .

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 6 days ago

To fix this problem, add a permissions block at the root level of the workflow file (just under the name: key, and either before or after the on: block, but conventionally before on:), specifying the least permission required. Since the jobs in this workflow only check out code and run Go commands (tests and build), they only need contents: read. No steps modify repository data or interact with issues, so no write permissions are required. The change consists of adding:

permissions:
  contents: read

at the top level of the workflow YAML file, preferably just after name: CI.

Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,6 @@
 name: CI
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: CI
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants