Skip to content

piepline fix

piepline fix #19

name: Static checks and unit tests
on:
push:
branches: '*'
pull_request:
branches: [ main ]
jobs:
test-linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12]
steps:
- uses: actions/checkout@v2
- name: Update APT cache
run: sudo apt-get update
- name: Install graphviz for class and package diagrams
run: sudo apt-get install graphviz
- 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
python -m pip install wheel
pip install -r requirements/test.txt
- name: Static type checking with mypy
run: python dev-tools/dev_tools.py --type
- name: Lint with pylint
run: python dev-tools/dev_tools.py --lint --keep-results
- name: Generate class and package diagrams
run: |
python dev-tools/dev_tools.py --diagram --keep-results
- name: Test with pytest
run: python dev-tools/dev_tools.py --unit "not manual and not windows and not tool" --keep-results
- name: Build documentation
run: python dev-tools/dev_tools.py --doc
- name: Upload test results and coverage reports
uses: actions/upload-artifact@v2
with:
name: pytrnsys-process-build-artifacts-linux
path: |
test-results
doc/_build
test-windows:
runs-on:
- self-hosted
- spf-windows-gh-runners
steps:
- uses: actions/checkout@v2
- name: Remove old venv
run: |
if (Test-Path -LiteralPath venv) {
Remove-Item -LiteralPath venv -Recurse
}
- name: Create virtual environment
run: py -3.12 -m venv venv
- name: Install dependencies
run: |
venv\Scripts\python -m pip install --upgrade pip
venv\Scripts\python -m pip install wheel
venv\Scripts\python -m pip install -r requirements/test.txt
- name: Static type checking with mypy
run: venv\Scripts\python dev-tools\dev_tools.py --type
- name: Lint with pylint
run: venv\Scripts\python dev-tools\dev_tools.py --lint --keep-results
- name: Test with pytest
run: venv\Scripts\python dev-tools\dev_tools.py --unit "not manual and not linux and not tool" --keep-results
- name: Build documentation
run: venv\Scripts\python dev-tools\dev_tools.py --doc
- name: Upload test results and coverage reports
uses: actions/upload-artifact@v4
with:
name: pytrnsys-process-build-artifacts-windows
path: |
test-results
doc/_build