Skip to content

Support for automated Pypi release #11

Support for automated Pypi release

Support for automated Pypi release #11

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
run: |
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.in-project true
- name: Cache Poetry virtualenv
uses: actions/cache@v3
with:
path: |
.venv
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: |
poetry install --without experiments --without docs
- name: Run tests with coverage
continue-on-error: true
run: |
poetry run pytest --cov=fpboost --cov-report=xml --cov-report=html --junitxml=reports/test-results.xml
- name: Upload to Codecov
- name: Upload coverage report
if: ${{ matrix.python-version == '3.12' }}
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.python-version }}
path: reports/