Skip to content

Add support for missing CLI options #81

Add support for missing CLI options

Add support for missing CLI options #81

Workflow file for this run

name: Test
on: [ pull_request ]
jobs:
test:
strategy:
matrix:
# https://devguide.python.org/versions/
python: [ "3.8", "3.11", "3.12" ]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
env:
PYTHONUTF8: 1
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: pipenv
- name: Install dependencies for Python ${{ matrix.python-version }} in dev mode
run: |
python -m pip install --upgrade pipenv wheel
pipenv install --dev
- name: Add directory to PYTHONPATH on Linux
if: runner.os == 'Linux'
run: |
echo "PYTHONPATH=$PYTHONPATH:$PWD/src" >> $GITHUB_ENV
- name: Add directory to PYTHONPATH on Windows
if: runner.os == 'Windows'
run: |
echo "PYTHONPATH=$env:PYTHONPATH;$PWD\src" >> $env:GITHUB_ENV
shell: pwsh
- name: Gather test coverage data with unittest
# -s is --start-directory and -t is --top-level-directory
# I deliberately set both to root directory of the repository in case the test dir gets renamed later
# pipenv runs coverage, which in turns runs unittest
run: |
pipenv run coverage run -m unittest discover -s . -t .
- name: Check coverage requirement threshold
uses: py-cov-action/python-coverage-comment-action@v3
if: runner.os == 'Linux'
with:
GITHUB_TOKEN: ${{ github.token }}
MINIMUM_GREEN: 90
MINIMUM_ORANGE: 70