Skip to content

feat:sportscode

feat:sportscode #478

Workflow file for this run

name: build
on:
push:
branches: [main, develop]
pull_request:
branches: []
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12']
poetry-version: [1.8.3]
env:
MPLBACKEND: Agg # https://github.com/microsoft/azure-pipelines-tasks/issues/16426
steps:
- name: Check out source repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Cache poetry virtualenv
uses: actions/cache@v2
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Change poetry config to cached virtualenv
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- name: Test with pytest
run: |
poetry run pytest --cov --cov-report xml .
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3