Skip to content

ci: modernize GitHub Actions#9

Merged
altaywtf merged 1 commit into
masterfrom
improve-github-actions-ci
May 7, 2026
Merged

ci: modernize GitHub Actions#9
altaywtf merged 1 commit into
masterfrom
improve-github-actions-ci

Conversation

@altaywtf

@altaywtf altaywtf commented May 7, 2026

Copy link
Copy Markdown
Member

Changed

  • Replaces Travis and the old split test/lint workflows with one CI workflow using current Node 24-compatible Actions.
  • Tests the supported Go floor on 1.17.x and current Go on 1.26.x.
  • Runs race tests and golangci-lint v2.11.3 in the quality job.
  • Updates go.mod to go 1.17, matching the existing golang.org/x/oauth2 dependency floor.
  • Adds Dependabot maintenance for Go modules and GitHub Actions, and updates the README badge.
  • Cleans up test response writes so the modern lint job passes.
  • Fixes streamed response timeout handling so callers can read bodies returned from Client.Do(..., nil) before the timeout context is canceled.
  • Closes no-body config write responses explicitly, with coverage for SetAll, Set, and Del, so the streaming fix does not leak response bodies.

Risks

  • This makes Go 1.17 the declared minimum instead of the stale 1.13 directive.
  • This does not add release publishing because go-putio is tag-consumed as a Go module and has no existing artifact release target.
  • The streaming timeout fix changes cleanup timing for streamed bodies: callers must close the body, matching the existing contract.

Complexity

  • Neutral: workflows are consolidated; runtime changes are limited to Client.Do timeout cleanup and the config methods that intentionally discard response bodies.

Verification

  • mise exec go@1.26.2 -- go mod tidy
  • mise exec go@1.26.2 -- go test -v ./...
  • mise exec go@1.26.2 -- go test -race -count=1 ./...
  • mise exec go@1.26.2 golangci-lint@2.11.3 -- golangci-lint run ./...
  • actionlint

Copilot AI review requested due to automatic review settings May 7, 2026 12:54
@altaywtf altaywtf force-pushed the improve-github-actions-ci branch from 7a7996c to 20cb9ce Compare May 7, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Modernizes the repository’s CI and maintenance automation by consolidating Go test/lint workflows into a single GitHub Actions pipeline, removing Travis, and aligning tests with stricter linting requirements.

Changes:

  • Replace Travis + split GitHub Actions workflows with a single .github/workflows/ci.yml workflow (tests + vet + race + golangci-lint).
  • Add Dependabot updates for Go modules and GitHub Actions; update README badge to the new CI workflow.
  • Refactor test response writing to check write errors consistently via a shared writeResponse helper.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
zips_test.go Switch fixture writes to writeResponse helper.
transfers_test.go Switch fixture writes to writeResponse helper.
friends_test.go Switch fixture writes to writeResponse helper.
files_test.go Switch fixture writes to writeResponse helper (also contains two updated JSON fixture lines).
events_test.go Switch fixture writes to writeResponse helper.
account_test.go Switch fixture writes to writeResponse helper.
client_test.go Add writeResponse test helper (and import fmt).
README.md Replace old workflow badges with a single CI badge.
.travis.yml Remove legacy Travis CI configuration.
.github/workflows/golangci-lint.yml Remove legacy lint workflow.
.github/workflows/go-test.yml Remove legacy test workflow.
.github/workflows/ci.yml Add consolidated CI workflow (tests/vet/race/lint).
.github/dependabot.yml Add Dependabot configuration for gomod and GitHub Actions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml Outdated
Comment thread files_test.go
Comment thread files_test.go
@altaywtf altaywtf force-pushed the improve-github-actions-ci branch 5 times, most recently from b628ad6 to 6a639ec Compare May 7, 2026 13:43
@altaywtf altaywtf force-pushed the improve-github-actions-ci branch from 6a639ec to 69db964 Compare May 7, 2026 14:16
@altaywtf altaywtf merged commit 8f47dab into master May 7, 2026
3 checks passed
@altaywtf altaywtf deleted the improve-github-actions-ci branch May 7, 2026 14:26
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