Skip to content

Bump numpy from 1.25.1 to 1.26.1 #500

Bump numpy from 1.25.1 to 1.26.1

Bump numpy from 1.25.1 to 1.26.1 #500

name: Lint and Tests
on:
push:
branches:
- master
- release/*
pull_request:
branches:
- master
- release/*
jobs:
################
# TESTS & LINT #
################
tests:
name: macOS/Linux Tests & Lint
strategy:
fail-fast: true
matrix:
python-version: [3.9, "3.10", "3.11"]
os: [ubuntu-latest, macos-latest]
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Get full python version
id: full-python-version
run: |
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info[:3]))")
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Set up cache
uses: actions/cache@v2
id: cached-poetry-dependencies
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Lint and static analysis
run: |
poetry run isort --check --diff vsketch vsketch_cli examples tests
poetry run black --check --diff vsketch vsketch_cli examples tests
poetry run mypy
# needed for tests to work on ubuntu (libEGL.so.1)
- name: Install EGL mesa
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -y -qq
sudo apt-get install -y -qq libegl1-mesa libegl1-mesa-dev
- name: Pytest
run: |
poetry run pytest --runslow
## FIXME codecov
if: true || matrix.python-version != '3.11' || matrix.os != 'ubuntu-latest'
## CODECOV SUPPORT ##
## TODO: need to be activated
- name: Pytest with coverage
run: |
poetry run pytest --runslow --cov=./ --cov-report=xml
if: false && matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
## FIXME codecov
if: false && matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
#################
# TESTS WINDOWS #
#################
tests-windows:
name: Windows Tests
strategy:
fail-fast: true
matrix:
python-version: [3.9, "3.10", "3.11"]
defaults:
run:
shell: bash
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
run: |
poetry install
- name: Pytest
run: |
poetry run pytest --runslow