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

Add a justfile #768

Closed
wants to merge 1 commit into from
Closed

Add a justfile #768

wants to merge 1 commit into from

Conversation

thvdveld
Copy link
Contributor

The justfile contains the same cargo checks and tests that are performed by the github actions. Many times opening a pull request will result in failed tests or checks because of all the feature flags. Therefore, I created this file which can be used with https://github.com/casey/just .

The justfile contains the same cargo checks and tests that are performed
by the github actions.
@crawford
Copy link
Contributor

This seems like it will take a bit of work to keep in sync with the actions. Is there any way to operate from a single source of truth instead?

@thvdveld
Copy link
Contributor Author

I'm totally not familiar with GitHub Actions, so I'm not sure how I would do that. Probably we'll have to read out the feature combinations from a file and converting that to a matrix. But I'm not sure how to set that up.

@crawford
Copy link
Contributor

What about using act?

@thvdveld
Copy link
Contributor Author

I tried using that in the past, but I get the following: /var/run/act/workflow/1: line 2: cargo: command not found, linking to nektos/act#107 . Not sure why that is failing.

@Dirbaio
Copy link
Member

Dirbaio commented Apr 13, 2023

+1 to having some way to run CI locally.

In other repos I've just placed a ci.sh in the root, and made GHA run that. So the same file is used for both GHA and local testing.

Super low-tech, works fine. I'm not sure if it's worth making people install just, instead of using a plain old shell script.

This means we lose parallelism in the GHA runs because it'll all be 1 job instead of 45. However, we're already hitting the max limit of 20 concurrent jobs, so what GHA is doing is start 20 jobs, wait for them to finish, start the next 20, wait, start the last 5. Starting a job has quite a bit of latency, so in practice it's quite likely that a single job will be faster.

@thvdveld
Copy link
Contributor Author

Closing this and created a PR with ci.sh for GHA.

@thvdveld thvdveld closed this Apr 14, 2023
@thvdveld thvdveld deleted the justfile branch April 14, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants