Skip to content

Merge pull request #199 from Rebekah-Chuang:Rebekah-Chuang/issue194 #25

Merge pull request #199 from Rebekah-Chuang:Rebekah-Chuang/issue194

Merge pull request #199 from Rebekah-Chuang:Rebekah-Chuang/issue194 #25

# this workflow is triggered on push to the main branch and runs all tests across multiple python versions
# test python versions from 3.9 to 3.12(since sphinx depends on >=3.9)
name: run-pytest-with-tox
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
fail-fast: false
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2
- name: Load cached venv
uses: actions/cache@v4
with:
path: .tox
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Update Poetry lock file
run: poetry lock --no-update
- name: Test with tox
run: tox