Skip to content

Update test workflow #46

Update test workflow

Update test workflow #46

Workflow file for this run

name: Linux CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14, ubuntu-22.04, ubuntu-24.04]
glpk: ['5.0']
python-version: ['3.9', '3.10', '3.11', '3.12']
include:
- {os: ubuntu-20.04, glpk: '4.65', python-version: '3.8' }
steps:
- uses: actions/checkout@v4
- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: instal glpk ${{ matrix.glpk }}
run: |
curl -LO http://ftp.gnu.org/gnu/glpk/glpk-${{ matrix.glpk }}.tar.gz
tar -xzf glpk-${{ matrix.glpk }}.tar.gz
pushd glpk-${{ matrix.glpk }}
./configure
make -j $(nproc)
sudo make install
[[ $(uname) == Darwin ]] || sudo ldconfig
popd
- name: install lcov
run: |
platform="$(uname)"
case "${platform}" in
Darwin)
brew update -q
HOMEBREW_NO_INSTALL_CLEANUP=true brew install -q lcov
;;
Linux)
sudo apt-get update -q=1 -y
sudo apt-get install -q=1 -y lcov
;;
*)
echo >&2 "Unknown platform '${platform}'; supported platforms are 'Darwin' and 'Linux'"
exit 1
;;
esac
- name: run tox
run: |
pip install setuptools_scm tox
tox -e py
mkdir coverage
lcov --capture --directory . --output-file ./coverage/lcov.info
- name: upload coverage to coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run_${{ matrix.os }}_${{ matrix.glpk }}_${{matrix.python-version }}
parallel: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: coveralls finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true