Skip to content

Update supported python versions #10

Update supported python versions

Update supported python versions #10

Workflow file for this run

# This workflow will install Python dependencies, run tests with a variety of Python versions
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10, 3.11]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.architecture }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: cache Linux
uses: actions/cache@v2
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_test.txt') }}
restore-keys: |
${{ runner.os }}-${{ runner.architecture }}-${{ runner.python-version }}pip-
- name: cache MacOS
uses: actions/cache@v2
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_test.txt') }}
restore-keys: |
${{ runner.os }}-${{ runner.architecture }}-${{ runner.python-version }}pip-
- name: cache Windows
uses: actions/cache@v2
if: startsWith(runner.os, 'Windows')
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements_test.txt') }}
restore-keys: |
${{ runner.os }}-${{ runner.architecture }}-${{ runner.python-version }}pip-
- name: Install dependencies
run: |
python -c "import platform; print(platform.platform()); print(platform.architecture())"
python -m pip install --upgrade pip
python -m pip install wheel
pip install .
pip install -r requirements_test.txt
- name: Test with numba
run: |
pytest . -v --disable-numba=0
- name: Test without numba
run: |
pytest . -v --disable-numba=1 --cov-report html --cov=flexsolve --cov-report term-missing -m "not slow"
env:
COVERALLS_REPO_TOKEN: ${{ secrets.coveralls }}
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
run: |
curl https://coveralls.io/webhook?repo_token=${{ secrets.coveralls }} -d "payload[build_num]=${{ github.sha }}&payload[status]=done"