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

Improving GH Action CI: build, lint, test #260

Closed
4 tasks
thedavidprice opened this issue Mar 15, 2020 · 3 comments
Closed
4 tasks

Improving GH Action CI: build, lint, test #260

thedavidprice opened this issue Mar 15, 2020 · 3 comments

Comments

@thedavidprice
Copy link
Contributor

Currently we are using GH Actions for CI, however, GH Actions are early and don’t support our setup (lerna and yarn workspaces for the CRA app). It might be best to move the redwoodjs/redwood CI to something like CircleCI as our needs continue to grow.

Caching

Ideally node_modules would be cached for root and each package (currently managed by lerna) using GH Actions Cache. See also how to cache dependencies.

This is not yet possible. Related:

Run only on “changed” packages

  • employ something like lerna changed to build+test against modified packages only (need to choose what our reference will be… last npm release is more than needed but might be good enough first step. Ideally just new commits.)
  • Might need to separate into two Actions: 1) build and 2) test

Other Actions to consider adding

  • when new packages are published, auto-open PR on other repos that includes updated versions in packages.json Could possibly go as far as creating a new release of create-redwood-app (but don’t forget about needed to check for updates to yarn.lock)
  • monitor build size: see Possible CI solution for monitoring build size #196
@peterp
Copy link
Contributor

peterp commented Mar 15, 2020

employ something like lerna changed to build+test against modified packages only (need to choose what our reference will be… last npm release is more than needed but might be good enough first step. Ideally just new commits.)

I think it's OK to run all the tests for all of the packages since a PR may include interdependent modifications over several packages.

Might need to separate into two Actions: 1) build and 2) test

I don't think "build" is going to give us anything actionable or useful during CI. Maybe when we're using Typescript?

@thedavidprice
Copy link
Contributor Author

re: Modified packages
Ah, great point. I feel like I’ve seen something like this via CircleCI that must account for dependencies. The main object would be pre-emptive ways to reduce CI run time, which might not even be an issue near-term if at all. And/or caching node_modules to avoid unnecessary yarn install might be 80% of the efficiency gain anyway.

re: Build
It's just success/fail with the same output we get locally. Seems important to run given current low test coverage across packages (and increasing community PRs). Note: current running CI includes build, lint, and test. If it turns out to be unhelpful, can easily turn it off.

@thedavidprice
Copy link
Contributor Author

Current GH Action has been working well with no complaints or experience with tediously long run time.

GH Action cache capability hasn’t budged and the only PR addressing multi-path caching was deemed unviable.

There’s a separate Issue already for monitoring build size, which is likely the only remaining prioity here.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants