2020-04-28 15:39:32 +00:00
|
|
|
# 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
|
|
|
|
|
2020-04-28 15:45:36 +00:00
|
|
|
name: unittests
|
2020-04-28 15:39:32 +00:00
|
|
|
|
2023-03-14 00:32:00 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'setup.py'
|
|
|
|
- '*.iss'
|
|
|
|
- '.gitignore'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'docs/**'
|
|
|
|
- 'setup.py'
|
|
|
|
- '*.iss'
|
|
|
|
- '.gitignore'
|
2020-04-28 15:39:32 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2022-03-31 23:09:16 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
name: Test Python ${{ matrix.python.version }} ${{ matrix.os }}
|
2020-04-28 15:39:32 +00:00
|
|
|
|
2022-01-21 21:52:16 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2022-03-31 23:09:16 +00:00
|
|
|
os: [ubuntu-latest]
|
2022-01-21 21:52:16 +00:00
|
|
|
python:
|
|
|
|
- {version: '3.8'}
|
|
|
|
- {version: '3.9'}
|
2022-04-01 21:39:29 +00:00
|
|
|
- {version: '3.10'}
|
2022-03-31 23:09:16 +00:00
|
|
|
include:
|
2022-04-01 21:39:29 +00:00
|
|
|
- python: {version: '3.8'} # win7 compat
|
|
|
|
os: windows-latest
|
|
|
|
- python: {version: '3.10'} # current
|
2022-03-31 23:09:16 +00:00
|
|
|
os: windows-latest
|
2023-03-03 08:43:25 +00:00
|
|
|
- python: {version: '3.10'} # current
|
|
|
|
os: macos-latest
|
2020-04-28 15:39:32 +00:00
|
|
|
|
|
|
|
steps:
|
2023-03-14 00:32:00 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-21 21:52:16 +00:00
|
|
|
- name: Set up Python ${{ matrix.python.version }}
|
2023-03-14 00:32:00 +00:00
|
|
|
uses: actions/setup-python@v4
|
2020-04-28 15:39:32 +00:00
|
|
|
with:
|
2022-01-21 21:52:16 +00:00
|
|
|
python-version: ${{ matrix.python.version }}
|
2020-04-28 15:39:32 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2022-09-01 07:30:28 +00:00
|
|
|
python -m pip install --upgrade pip wheel
|
|
|
|
pip install flake8 pytest pytest-subtests
|
2022-05-03 20:14:03 +00:00
|
|
|
python ModuleUpdate.py --yes --force --append "WebHostLib/requirements.txt"
|
2020-04-28 15:54:23 +00:00
|
|
|
- name: Unittests
|
2020-04-28 15:39:32 +00:00
|
|
|
run: |
|
2022-12-11 12:15:23 +00:00
|
|
|
pytest
|