Last active
October 26, 2021 12:27
-
-
Save jnahelou/a764a75f5ae0bf9b23724214348e9575 to your computer and use it in GitHub Desktop.
python cookiecutter ci example
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: CI | |
on: | |
push: | |
pull_request: | |
branches: [master] | |
jobs: | |
Quality: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
id: setup-python | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r {{cookiecutter.project_slug}}/requirements-dev.txt | |
{%- if cookiecutter.use_pylint == "y" %} | |
- name: Analysing the code with pylint | |
run: | | |
pylint -v --rcfile={{cookiecutter.project_slug}}/.pylintrc {{cookiecutter.project_slug}}/*.py | |
{%- endif %} | |
{%- if cookiecutter.use_pytest == "y" %} | |
- name: Analysing the code with pytest | |
run: | | |
pytest -vv {{cookiecutter.project_slug}} | |
{%- endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment