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

chore: Improve CI builds by improving caching and decomposing steps #528

Merged
merged 9 commits into from
Mar 22, 2022

Conversation

kylecarbs
Copy link
Member

@kylecarbs kylecarbs commented Mar 22, 2022

  • Separates the mock and PostgreSQL database tests.
  • Fixes the Go mod cache being separate per-OS.
  • Fixes a few race conditions that appeared during testing.

@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #528 (92b488e) into main (c451f4e) will decrease coverage by 2.14%.
The diff coverage is 72.72%.

@@            Coverage Diff             @@
##             main     #528      +/-   ##
==========================================
- Coverage   62.54%   60.40%   -2.15%     
==========================================
  Files         191      191              
  Lines       10856    10864       +8     
  Branches       85       85              
==========================================
- Hits         6790     6562     -228     
- Misses       3341     3583     +242     
+ Partials      725      719       -6     
Flag Coverage Δ
unittest-go-macos-latest 56.35% <59.09%> (-0.47%) ⬇️
unittest-go-ubuntu-latest 59.73% <72.72%> (-1.34%) ⬇️
unittest-go-windows-2022 55.87% <81.25%> (-0.58%) ⬇️
unittest-js 63.19% <ø> (ø)
Impacted Files Coverage Δ
pty/start_other.go 64.70% <0.00%> (-11.16%) ⬇️
peer/conn.go 78.17% <100.00%> (-1.88%) ⬇️
provisionerd/provisionerd.go 77.37% <100.00%> (-3.78%) ⬇️
coderd/tunnel/tunnel.go 0.00% <0.00%> (-80.65%) ⬇️
database/pubsub.go 0.00% <0.00%> (-77.09%) ⬇️
database/db.go 0.00% <0.00%> (-55.18%) ⬇️
database/migrate.go 0.00% <0.00%> (-45.00%) ⬇️
coderd/coderdtest/coderdtest.go 88.88% <0.00%> (-10.00%) ⬇️
cli/config/file.go 67.64% <0.00%> (-8.83%) ⬇️
peerbroker/dial.go 75.43% <0.00%> (-7.02%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c451f4e...92b488e. Read the comment docs.

@kylecarbs kylecarbs requested a review from coadler March 22, 2022 20:59
@kylecarbs kylecarbs self-assigned this Mar 22, 2022
@kylecarbs kylecarbs marked this pull request as ready for review March 22, 2022 21:27
@kylecarbs kylecarbs enabled auto-merge (squash) March 22, 2022 21:34
@kylecarbs kylecarbs changed the title chore: Improve CI builds by caching Go modules chore: Improve CI builds by improving caching and decomposing steps Mar 22, 2022
select {
case <-timer.C:
p.failActiveJobf("cancelation timed out")
return
case <-ctx.Done():
timer.Stop()
Copy link
Member

Choose a reason for hiding this comment

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

Why do we only want to stop the timer on a context cancel?

Copy link
Member Author

Choose a reason for hiding this comment

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

The timer will automatically stop if it completes, since it's not a ticker!

@kylecarbs kylecarbs merged commit 26d24f4 into main Mar 22, 2022
@kylecarbs kylecarbs deleted the faster-ci branch March 22, 2022 22:09
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.

None yet

2 participants