Merge pull request #26 from codersforcauses/i3 #26
This file contains hidden or 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: Python package | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: "Log level" | |
required: false | |
default: "warning" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] # you can add more python version to test it in | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Test with pytest | |
run: | | |
pytest --cov-report html --cov=. | |
- uses: actions/upload-artifact@v1 | |
if: always() | |
with: | |
name: coverage-report | |
path: htmlcov | |
# flake8_py3: | |
# name: "Linting with Flake8" | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: "Set up Python" | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.x | |
# - name: "Install flake8" | |
# run: pip install flake8 | |
# - name: "Install flake8-django" | |
# run: pip install flake8-django | |
# - name: "Run flake8" | |
# uses: liskin/gh-problem-matcher-wrap@v1 | |
# with: | |
# linters: flake8 | |
# run: flake8 --max-line-length 150 . |