Skip to content

chore: make tests running on windows. #395

chore: make tests running on windows.

chore: make tests running on windows. #395

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Testing
on:
push:
branches: [ main, dev ]
paths-ignore:
- '**.md'
- '**.jpg'
- '**.pdf'
- '**.png'
- '**.rst'
- '**.gif'
- '**.yml'
- 'const.py'
jobs:
build:
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
os: [ubuntu-latest, macos-latest] #, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up with Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: matrix.os != 'windows-latest'
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install dependencies on Windows
if: matrix.os == 'windows-latest'
run: |
python -m pip install --upgrade pip
if (Test-Path -Path '.\requirements.txt' -PathType Leaf) {pip install -r requirements.txt}
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -s ./tests
- name: Test installation from source
run: python setup.py install