Skip to content

Add CI tests for Python 3.8, 3.11 #45

Add CI tests for Python 3.8, 3.11

Add CI tests for Python 3.8, 3.11 #45

name: pip - Build, Lint, Test, and Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-lint-test-coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Get git tags
run: git fetch --prune --unshallow --tags
- name: Set up miniconda
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: "difi"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Build and install
run: pip install .[tests]
- name: Lint
run: pre-commit run --all-files
- name: Test
run: pytest . --cov --cov-report xml
- name: Coverage
uses: coverallsapp/github-action@v2.0.0
with:
github-token: ${{ secrets.COVERALLS_TOKEN }}
path-to-lcov: coverage.xml