Skip to content
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

ci: Rewrite GitHub Action workflows #346

Merged
merged 1 commit into from
May 19, 2021

Conversation

rhcarvalho
Copy link
Contributor

  • Break up Test and Lint into separate workflows (could be simply
    separate jobs for parallelism, but separate workflows also allow
    independent re-runs, independent triggers and independent concurrency
    group)
  • Use minimal permissions for GITHUB_TOKEN
  • Cancel outdated jobs when PR/branch is updated
  • Test on Linux/Windows/macOS
  • Use actions/cache
  • Stop testing against Go tip (was never a hard requirement and is
    slower because requires compiling the toolchain)
  • Stop testing against Go 1.13, start testing against Go 1.16 (because
    we focus support on the last 3 releases of Go, more than the community
    practice of supporting the last 2)
  • Use the official golangci-lint action and the latest version of the
    tool at the moment

- Break up Test and Lint into separate workflows (could be simply
separate jobs for parallelism, but separate workflows also allow
independent re-runs, independent triggers and independent concurrency
group)
- Use minimal permissions for GITHUB_TOKEN
- Cancel outdated jobs when PR/branch is updated
- Test on Linux/Windows/macOS
- Use actions/cache
- Stop testing against Go tip (was never a hard requirement and is
slower because requires compiling the toolchain)
- Stop testing against Go 1.13, start testing against Go 1.16 (because
we focus support on the last 3 releases of Go, more than the community
practice of supporting the last 2)
- Use the official golangci-lint action and the latest version of the
tool at the moment
@rhcarvalho rhcarvalho force-pushed the rhcarvalho/github-actions-ci-workflow branch from 80ed3b4 to 100c58f Compare May 18, 2021 16:13
@rhcarvalho
Copy link
Contributor Author

Could have kept ci.yml to do the transition of required checks in two steps/PRs, but the extra complexity didn't feel necessary.

- uses: actions/checkout@v2
with:
path: ${{ env.WORKDIR }}
# TODO: cache dependencies
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't enable this step for now because it requires a bit more thought on the cache key or how to update dependencies.

In GOPATH Mode we download all dependencies in their latest commits. With too aggressive caching or missing an update step (a la go get -u) we'd be testing against stale dependencies.

We can't use go get -d -t -u -v ./... because that would also try to update sentry-go itself. The solution probably requires resorting to go list and would need to work no matter if we got a cache hit or miss. Deferring that for later.

This job is obviously prone to breakage (dependencies are changing out of our control) and not going to be required to merge changes.

Copy link
Contributor

@kamilogorek kamilogorek left a comment

Choose a reason for hiding this comment

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

There's nothing outstanding in the config, so I think it's fine as long as all workflows passes.

@rhcarvalho rhcarvalho merged commit 60b0ad4 into master May 19, 2021
@rhcarvalho rhcarvalho deleted the rhcarvalho/github-actions-ci-workflow branch May 19, 2021 13:44
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