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

Example earthfile for testing weather script #231

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexcb
Copy link

@alexcb alexcb commented Apr 26, 2021

This draft PR shows how earthly can be used to test the script across different linux distros and http clients.

I picked the weather script to start with for this example, but should be extendable to all scripts if you think this is useful.

I renamed the shellcheck github action to ci.yml; and added the schellcheck logic under the "+lint" target. Tests can now be run via github actions, or locally using github.com/earthly/earthly

To run them locally, run:

earthly +all

or if you want to target a specific OS and http client combination, with:

earthly --build-arg OS=ubuntu --build-arg HTTP_CLIENT=httpie +test-weather

or if you just want to run linting:

earthly +lint

- this is an example CI test for the weater script, which can be
expanded to all scripts.

Signed-off-by: Alex Couture-Beil <[email protected]>
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.

1 participant