Skip to content

Instantly share code, notes, and snippets.

@jnahelou
Last active October 26, 2021 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnahelou/a764a75f5ae0bf9b23724214348e9575 to your computer and use it in GitHub Desktop.
Save jnahelou/a764a75f5ae0bf9b23724214348e9575 to your computer and use it in GitHub Desktop.
python cookiecutter ci example
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