Skip to content

Merge pull request #33 from PioneersHub/ah-patch #267

Merge pull request #33 from PioneersHub/ah-patch

Merge pull request #33 from PioneersHub/ah-patch #267

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: test-${{ github.head_ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
GITHUB: "1"
jobs:
run-github-job-matrix:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.10' , '3.11'] #, '3.12'] highspy doesn't support 3.12 yet
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Hatch & pre-commit
run: pip install --upgrade --pre hatch pre-commit
- name: Initialise default environment
run: hatch run python --version
- name: Linting
if: matrix.python-version == '3.10' && runner.os == 'Linux'
run: hatch run lint:all
- name: Run tests and track code coverage
run: hatch run ci
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.test_number }}
parallel: true
path-to-lcov: coverage.lcov
finish-coveralls:
if: ${{ always() }}
needs: run-github-job-matrix
runs-on: ubuntu-latest
steps:
- name: Coveralls finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
path-to-lcov: coverage.lcov