Skip to content

updates from other projects #7

updates from other projects

updates from other projects #7

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", "dev" ]
tags:
- '[0-9]*'
jobs:
test:
if: github.ref != 'refs/heads/dev'
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 --no-deps -r tests/requirements.lock
pip install .
- name: Run Tests
run: |
python -m unittest discover tests -v
coverage:
if: github.ref == 'refs/heads/dev'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["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: Coverage
env:
COVERAGE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python -m pip install --upgrade pip
pip install --no-deps -r tests/requirements.lock
pip install coverage coveralls
cp packaging/setup.py .
pip install .
coverage run --rcfile=packaging/coverage.ini -m unittest discover tests
coverage report --rcfile=packaging/coverage.ini
coveralls