Created
February 8, 2022 17:54
-
-
Save Mgancita/77f2b6eee6529503424afc4767fd0db7 to your computer and use it in GitHub Desktop.
GH Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Code Quality Checks | |
on: | |
push: | |
branches: [master, development] | |
pull_request: | |
branches: [master, development] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7 | |
- name: Install poetry | |
run: pip install poetry | |
- name: Install dependencies | |
run: poetry update | |
- name: Unit test with pytest | |
run: poetry run pytest | |
- name: Check style with flake8 & pylint | |
run: | | |
poetry run flake8 hooks/ tests/ | |
- name: Check format with black | |
run: poetry run black --check hooks/ tests/ | |
- name: Check type hinting with mypy | |
run: poetry run mypy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment