Skip to content

Workflow file for this run

name: Unit Tests
on:
push:
branches: [ "main" ]
paths:
- '.github/**'
- 'tests/**'
- 'metasnek/**'
- 'setup.py'
pull_request:
branches: [ "main" ]
paths:
- '.github/**'
- 'tests/**'
- 'metasnek/**'
- 'setup.py'
permissions:
contents: read
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
matrix:
os: [macos-12, ubuntu-latest]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: "actions/checkout@v3"
with:
fetch-depth: 0
# Setup env
- uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
auto-activate-base: false
- name: "Test and generate coverage report on ${{ matrix.os }} for Python ${{ matrix.python-version }}"
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pytest coverage
python3 -m pip install .
coverage run -m pytest