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 #5

Merged
merged 5 commits into from
May 11, 2023
Merged

👷 Setup GitHub Actions Continuous Integration tests #5

merged 5 commits into from
May 11, 2023

Conversation

weiji14
Copy link
Member

@weiji14 weiji14 commented May 11, 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 chabud/tests/test_datapipe.py to ensure ChaBuDDataPipeModule 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 gitignoring __pycache__/ and pytest_cache/ folders

How you can test it

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

Related Issues

Based on weiji14/zen3geo#2 and code from the private ml-pipeline repo.

Running tests on Ubuntu-22.04 and Python 3.11 only for now. Added a single integration test to check that the ChaBudDataPipeModule works.Tests ran using `python -m pytest chabud/tests/`. Also gitignoring __pycache__/ and pytest_cache/ folders.
@weiji14 weiji14 self-assigned this May 11, 2023
weiji14 added 4 commits May 11, 2023 15:52
To fix `Error: Must provide 'environment-name' if environment.yml doesn't provide a 'name' attribute` for mamba-org/provision-with-micromamba.
Switch to the newer setup-micromamba GitHub Action. The extra-specs doesn't seem to work with unified conda-lock.yml, so installing pytest manually before running the unit tests. Also switched to using the micromamba shell.
The packages should already be listed under the setup-micromamba step.
The micromamba shell isn't quite what I expected it to be. The `micromamba` command is missing from it!
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