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

Make CI and local test workflows the same #572

Closed
micahhausler opened this issue Dec 21, 2021 · 4 comments
Closed

Make CI and local test workflows the same #572

micahhausler opened this issue Dec 21, 2021 · 4 comments
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@micahhausler
Copy link
Contributor

In the last few Tink PRs I've made, one major point of difficulty has been that make targets don't fully reflect what gets run in CI. I can have a branch where running make test && make verify works locally, but CI can still fail for various reasons.

I've filed one-off issues or questions on PRs about this past (ex: #556, comment on #563), but it seems to me that a stated policy for Tinkerbell (not just this repo) of something like "Tests run in CI should be easy and straightforward to run locally." This may be as simple as enforcing that only make commands are invoked in CI, aside from some CI build cache setup.

Expected Behavior

As a developer making changes to Tinkerbell, I expect that I can run validations locally that my code is correct, and expect that CI will pass.

Current Behavior & Possible Solutions

The current test setup behavior relies on Nix shell and also runs some one-off commands.

  • Nix seems great, but not everyone has that setup locally. I think a make target for setting up a nixos container + a tooling/build cache volume could lower the barrier to new developers
  • Several CI steps are either partially duplicated from make targets, or call one-off make targets

Context

In the 12/9/21 Tinkerbell community meeting, this came up as a discussion point.

Your Environment

Developers are probably using either macOS, Linux, or Windows, and it'd be nice to accommodate all three, or state which ones we support.

@displague
Copy link
Member

displague commented Jan 12, 2022

Something that I have found useful for testing GH Action CI locally is https://github.com/nektos/act#example-commands

(This is not a direct response to the issue.)

@displague
Copy link
Member

I agree that the current state is not idea. I don't use nix and I'd rather not have to think about it. I like make and obvious targets. I build and test from Mac and Linux and don't want to hit hurdles when I switch environments.

I like when GH actions do GH specific things (annotating lines of code, adding coverage reports to the UI, doing robot work).
I don't like when GH actions or local tests take extra time to setup build environments (especially if this is done frequently, not cached or otherwise persisted).

@chrisdoherty4 chrisdoherty4 added the priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. label May 3, 2022
@chrisdoherty4
Copy link
Member

@micahhausler If we head down a container route is there really a need for nix? Containers give you everything nix does, just in a different and arguably more well known way.

@chrisdoherty4
Copy link
Member

We've made significant headway in improving this with recent changes such as #656.

There's more to do but most of the initial points raised are fixed. Will raise separate more specific issues as they come up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests

3 participants