Skip to content

Compute variables online plotter #581

Compute variables online plotter

Compute variables online plotter #581

name: Static checks and unit tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test-windows:
runs-on:
- self-hosted
- spf-windows-gh-runners
env:
PY_COLORS: "1"
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\devTools.py --type
- name: Lint with pylint
run: venv\Scripts\python dev-tools\devTools.py --lint --keep-results
- name: Test with pytest
run: venv\Scripts\python dev-tools\devTools.py --unit "not manual and not linux and not tool" --keep-results
- name: Post coverage report to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: test-results/coverage.lcov
- name: Upload test results and coverage reports
uses: actions/upload-artifact@v4
with:
name: test-results-and-coverage-report-windows
path: test-results
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Trigger build of `pytrnsys-gui` executable
uses: peter-evans/repository-dispatch@v2
with:
repository: SPF-OST/pytrnsys_gui
token: ${{ secrets.PYTRNSYS_GUI_REPO_ACCESS_TOKEN }}
event-type: run-tests-and-build-executable
client-payload: '{"type": "run-tests-and-build-executable"}'