Skip to content

CI for different python versions and different os #83

CI for different python versions and different os

CI for different python versions and different os #83

Workflow file for this run

name: "Testing"
on:
push:
branches:
- main
pull_request:
branches:
- main
types:
- opened
- synchronize
workflow_run:
workflows: ["lint"]
types:
- completed
workflow_dispatch:
jobs:
test:
strategy:
matrix:
python: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
name: Install and test package on ${{ matrix.os }} for Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install package [pip]
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Run tests with Pytest
run: |
coverage run -m pytest
- name: Coverage
run: |
coverage report
coverage json
- name: Metadata check
run: |
python .github/scripts/metadata_checker
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}