updated dependency to control 0.10.0 #320
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v2 | |
# - name: Install Linux packages for Qt5 support # needed for Mayavi | |
# run: | | |
# sudo apt-get update | |
# sudo apt-get install qt5-default | |
# sudo apt-get install libxkbcommon-x11-0 | |
# sudo apt-get install libxcb-icccm4 | |
# sudo apt-get install libxcb-image0 | |
# sudo apt-get install libxcb-keysyms1 | |
# sudo apt-get install libxcb-randr0 | |
# sudo apt-get install libxcb-render-util0 | |
# sudo apt-get install libxcb-xinerama0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up SLYCOT build tools | |
run: | | |
sudo apt-get install build-essential | |
sudo apt-get install python3-dev gcc gfortran libopenblas-dev python3-pip cmake | |
sudo apt-get install libopenblas-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools | |
python -m pip install flake8 pytest coverage pytest-mock | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
- name: Test with pytest | |
uses: GabrielBB/xvfb-action@v1 # needed for Mayavi headless tests | |
with: | |
run: coverage run -m pytest | |
- name: Coverage Badge | |
uses: tj-actions/[email protected] | |
- name: Verify Changed files | |
if: matrix.python-version == '3.9' | |
uses: tj-actions/verify-changed-files@v9 | |
id: changed_files | |
with: | |
files: coverage.svg | |
- name: Commit files | |
if: (steps.changed_files.outputs.files_changed == 'true') && (matrix.python-version == '3.9') | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add coverage.svg | |
git commit -m "Updated coverage.svg" | |
- name: Push changes | |
if: (steps.changed_files.outputs.files_changed == 'true') && (matrix.python-version == '3.9') | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
branch: ${{ github.ref }} |