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

Setup GitHub Actions Continuous Integration tests #25

Merged
merged 2 commits into from
Nov 9, 2023
Merged

Setup GitHub Actions Continuous Integration tests #25

merged 2 commits into from
Nov 9, 2023

Conversation

weiji14
Copy link
Contributor

@weiji14 weiji14 commented Nov 9, 2023

What I am changing

  • Add Continuous Integration tests for every Pull Request and push to the main branch

How I did it

  • Added an integration test under src/tests/test_datapipe.py to ensure LightningCLI from Setup LightningCLI trainer script #24 works
  • Add GitHub Actions workflow in .github/workflows/test.yml which runs on Ubuntu-22.04 and Python 3.11
    • Uses https://github.com/mamba-org/setup-micromamba to install dependencies
    • Note that the conda-lock.yml lockfile is used, since micromamba support it! However, we're installing pytest separately instead of adding it to the environment.yml file.
  • Also added a .gitignore file

How you can test it

  • Install pytest and run python -m pytest --verbose src/tests/ locally

Related Issues

Based on developmentseed/chabud2023#5

Running tests on Ubuntu-22.04 and Python 3.11 only for now. Add a parametrized test to ensure that `python trainer.py fit --print_config=skip_null` works (as well as the validate/test subcommands). Tests are ran using `python -m pytest src/tests/`.
@weiji14 weiji14 self-assigned this Nov 9, 2023
@weiji14 weiji14 marked this pull request as ready for review November 9, 2023 22:32
@weiji14
Copy link
Contributor Author

weiji14 commented Nov 9, 2023

Merging directly since unit tests pass, and we're trying to move fast. Will follow up with other CI stuff like linters which are less critical and can go through a more proper review cycle.

@weiji14 weiji14 merged commit 4ac90e7 into main Nov 9, 2023
1 check passed
@weiji14 weiji14 deleted the ci branch November 9, 2023 22:34
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