Skip to content

try python 3.11

try python 3.11 #22

Workflow file for this run

name: Python CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
env:
CI: 'true' # Setting an environment variable 'CI' to 'true' - skip plot visualisation
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up dependencies (Linux)
if: runner.os == 'Linux'
run: |
cd prj/script
./venv_create.sh
cd ../..
- name: Set up dependencies (Windows)
if: runner.os == 'Windows'
run: |
cd prj\script
.\venv_create.cmd
cd ..\..
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
cd prj/script
./pip_reqs_install.sh
cd ../..
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
cd prj\script
.\pip_reqs_install.cmd
cd ..\..
- name: Run tests with pytest (Linux)
if: runner.os == 'Linux'
run: ./prj/venv/bin/pytest test/
- name: Run tests with pytest (Windows)
if: runner.os == 'Windows'
run: .\prj\venv\Scripts\pytest.exe test\
- name: Run type checking with mypy (Linux)
if: runner.os == 'Linux'
run: ./prj/venv/bin/mypy --check-untyped-defs -p test -p src
- name: Run type checking with mypy (Windows)
if: runner.os == 'Windows'
run: .\prj\venv\Scripts\mypy.exe --check-untyped-defs -p test -p src
#- name: Run linter with pylint (Linux)
# if: runner.os == 'Linux'
# run: ./prj/script/venv/bin/python -m pylint src
#- name: Run linter with pylint (Windows)
# if: runner.os == 'Windows'
# run: .\prj\venv\Scripts\python.exe -m pylint src