Skip to content

Update pyEnsemblRest #1

Update pyEnsemblRest

Update pyEnsemblRest #1

Workflow file for this run

on:
pull_request:
paths-ignore:
- .github/**
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
timeout-minutes: 5
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set Poetry Version
id: set-poetry-version
run: echo "POETRY_VERSION=$(cat .poetry-version)" >> $GITHUB_OUTPUT
- name: Install Poetry
id: install-poetry-version
uses: snok/install-poetry@v1
with:
version: ${{ steps.set-poetry-version.outputs.POETRY_VERSION }}
virtualenvs-create: true
virtualenvs-in-project: true
virtualenvs-path: .venv
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install project
run: poetry install --no-interaction
- name: Run unit tests with pytest and code coverage with pytest-cov
run: poetry run pytest -v --cov=pyensemblrest --cov-report lcov:./tests/lcov.info
- name: Upload Coverage Results
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./tests/lcov.info