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

CI: basic GitHub actions #1656

Merged
merged 5 commits into from
Feb 28, 2023
Merged

Conversation

mion00
Copy link
Contributor

@mion00 mion00 commented Feb 28, 2023

This is a building block for #1652. It provides a simple setup for linting the Python code and running unit tests on every Git push and PR.

Description

  • Add Github Actions workflow that gets triggered on every Git push (inspired by official Github examples):
    • the pipeline run against multiple python versions: "3.7", "3.8", "3.9", "3.10" (as does the current azure-pipeline config)
    • install dependencies from requirements.txt and cache them for faster builds
    • lint the code using flake8
    • run unit tests using pytest
  • Add tests/test_main.py with sample unit test written for pytest framework (otherwise it errors out with No tests found)
  • Add pyproject.toml to configure pytest (as from their best practises docs).
  • Move blake and flake8 config to pyproject.toml and .flake8 files for better readability. This way it is possible to run both tools locally with the same config that is used in the CI pipeline (useful for troubleshooting possible config or linting mistakes).

mion00 and others added 5 commits February 27, 2023 16:41
Add test_main.py with sample test. Add pyproject.toml to configure pytest.
…8 and black

Move blake and flake8 config to `pyproject.toml` and `.flake8` files for better readability
@acockburn
Copy link
Member

Looks good to me after review. When I merge this should I remove the Azure integration since we don't need both?

@mion00
Copy link
Contributor Author

mion00 commented Feb 28, 2023

Yeah I suppose since we are migrating to Github Action it is ok to disable Azure pipelines, otherwise we have both running at the same time.

@acockburn acockburn merged commit 80eda82 into AppDaemon:dev Feb 28, 2023
@acockburn
Copy link
Member

acockburn commented Feb 28, 2023 via email

@mion00 mion00 deleted the basic-github-actions branch March 1, 2023 06:54
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.

2 participants