Skip to content

build

build #11

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: build
on:
push:
branches: [ "master" ]
tags:
- '[0-9]*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
cp packaging/setup.py .
pip install .
python tests/smoke_test.py
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
pip install .
- name: Run Tests
run: |
python -m unittest discover tests -v
- name: Coverage
if: matrix.python-version == '3.12'
env:
COVERAGE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pip install coverage coveralls
coverage run --rcfile=packaging/coverage.ini -m unittest discover tests
coverage report --rcfile=packaging/coverage.ini
coveralls