This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
Introducing the V3 Core #311
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
poetry-version: ["1.7.1"] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: python -c "import sys; print(f'Python {sys.version} on {sys.platform}')" | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Cache Poetry virtualenv | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: ./.venv | |
key: poetry-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
restore-keys: | | |
poetry-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
- name: Set Poetry config | |
run: | | |
poetry config virtualenvs.in-project true | |
- name: Install Dependencies | |
run: poetry install | |
- name: Test with pytest | |
run: | | |
poetry run pytest tests --cov --cov-config=.coveragerc --cov-report=xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
env_vars: OS,PYTHON | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: false |