-
Notifications
You must be signed in to change notification settings - Fork 41
fix: migrate logging from zap to slog #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,34 @@ | ||
| name: "Lint" | ||
| name: Lint | ||
|
|
||
| on: [push, pull_request] | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths-ignore: | ||
| - "**.md" | ||
| - "docs/**" | ||
| pull_request: | ||
| paths-ignore: | ||
| - "**.md" | ||
| - "docs/**" | ||
|
|
||
| concurrency: | ||
| group: lint-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| jobs: | ||
| golangci: | ||
| name: "Lint" | ||
| runs-on: "ubuntu-latest" | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/setup-go@v5 | ||
| - uses: actions/checkout@v4 | ||
| - name: Crete empty build directory | ||
| run: mkdir ui/build && touch ui/build/.gitkeep | ||
| - name: golangci-lint | ||
| uses: golangci/golangci-lint-action@v6 | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-go@v6 | ||
| with: | ||
| version: v1.64 | ||
|
|
||
| codeql: | ||
| name: "Analyze with CodeQL" | ||
| runs-on: "ubuntu-latest" | ||
| permissions: | ||
| actions: "read" | ||
| contents: "read" | ||
| security-events: "write" | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: ["go"] | ||
| steps: | ||
| - uses: "actions/checkout@v2" | ||
| - uses: "github/codeql-action/init@v1" | ||
| go-version-file: "go.mod" | ||
| cache: true | ||
| - name: Create empty UI build directory | ||
| run: mkdir -p ui/build && touch ui/build/.gitkeep | ||
| - name: golangci-lint | ||
| uses: golangci/golangci-lint-action@v9 | ||
| with: | ||
| languages: "${{ matrix.language }}" | ||
| - uses: "github/codeql-action/autobuild@v1" | ||
| - uses: "github/codeql-action/analyze@v1" | ||
| version: latest | ||
| args: --timeout=5m |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,15 +4,24 @@ on: | |
| push: | ||
| branches: | ||
| - main | ||
| paths-ignore: | ||
| - "**.md" | ||
| - "docs/**" | ||
| pull_request: | ||
| workflow_dispatch: | ||
| paths-ignore: | ||
| - "**.md" | ||
| - "docs/**" | ||
|
|
||
| concurrency: | ||
| group: test-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| services: | ||
| postgres: | ||
| image: postgres:13 | ||
| image: postgres:15 | ||
| env: | ||
| POSTGRES_HOST: localhost | ||
| POSTGRES_USER: postgres | ||
|
|
@@ -26,18 +35,24 @@ jobs: | |
| ports: | ||
| - 5432:5432 | ||
| steps: | ||
| - name: Set up Go 1.x | ||
| uses: actions/setup-go@v4 | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: ^1.20 | ||
| id: go | ||
| go-version-file: "go.mod" | ||
| cache: true | ||
| - name: Create empty UI build directory | ||
| run: mkdir -p ui/build && touch ui/build/.gitkeep | ||
| - name: Install Protoc | ||
| uses: arduino/setup-protoc@v1 | ||
| uses: arduino/setup-protoc@v3 | ||
| with: | ||
| version: "3.x" | ||
| - name: Check out code into the Go module directory | ||
| uses: actions/checkout@v2 | ||
| - name: Test | ||
| version: "25.x" | ||
| - name: Run Test | ||
| run: make test | ||
| env: | ||
| TEST_DB_CONNECTIONSTRING: "postgres://postgres:postgres@localhost:5432/test_stencil_db?sslmode=disable" | ||
| - name: Install goveralls and send coverage | ||
| env: | ||
| COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| go install github.com/mattn/goveralls@latest | ||
| goveralls -coverprofile=coverage.out -service=github | ||
|
Comment on lines
+53
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify that `make test` produces coverage.out at the repo root and check the test target definition.
fd -HI -t f '^Makefile$' --max-depth 3
rg -nP -C2 '^(test|coverage)\s*:' Makefile 2>/dev/null || true
rg -n 'coverage\.out|-coverprofile' Makefile 2>/dev/null || trueRepository: raystack/stencil Length of output: 518 🏁 Script executed: #!/bin/bash
# Check if v0.0.12 is a valid version and look for available versions of goveralls
curl -s https://api.github.com/repos/mattn/goveralls/releases | jq -r '.[0:5] | .[] | "\(.tag_name)"' 2>/dev/null || echo "Unable to fetch releases"Repository: raystack/stencil Length of output: 84 Harden the coverage-upload step. Two concrete issues worth addressing:
The assumption that ♻️ Suggested change - name: Install goveralls and send coverage
+ if: always()
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- go install github.com/mattn/goveralls@latest
+ go install github.com/mattn/goveralls@v0.0.12
goveralls -coverprofile=coverage.out -service=github🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,35 +1,27 @@ | ||
| version: "2" | ||
| run: | ||
| timeout: 5m | ||
| output: | ||
| formats: | ||
| - format: colored-line-number | ||
| formatters: | ||
| enable: | ||
| - goimports | ||
| - gofmt | ||
| linters: | ||
| enable-all: false | ||
| disable-all: true | ||
| enable: | ||
| - govet | ||
| - goimports | ||
| - thelper | ||
| - tparallel | ||
| - unconvert | ||
| - wastedassign | ||
| - revive | ||
| - unused | ||
| - gofmt | ||
| - whitespace | ||
| - misspell | ||
| linters-settings: | ||
| revive: | ||
| ignore-generated-header: true | ||
| severity: warning | ||
| issues: | ||
| exclude-dirs: | ||
| - api/proto | ||
| - clients/java | ||
| - clients/js | ||
| - docs | ||
| - scripts | ||
| - ui | ||
| fix: true | ||
| severity: | ||
| default-severity: error | ||
| - errcheck | ||
| - staticcheck | ||
| exclusions: | ||
| paths: | ||
| - clients/java | ||
| - clients/js | ||
| - docs | ||
| - scripts | ||
| - ui | ||
| - gen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag filter widened from semver to any
v*tag.Changing
v*.*.*→v*means any tag starting withv(e.g.v-test,valpha,v1,v2-rc) will now trigger the release + Docker publish workflow. If that's intentional to support pre-release / short tags, ignore; otherwise consider restricting to semver-shaped tags, e.g.:🤖 Prompt for AI Agents