Skip to content

Update README.md

Update README.md #61

Workflow file for this run

name: Tests
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
run-with-coverage:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"
# Cache the installation of Poetry itself.
- name: Cache poetry installation
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-1.3.2
# Install Poetry.
- uses: snok/install-poetry@v1.3.3
with:
version: latest
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
# Cache dependencies.
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: .venv
key: pydeps-${{ runner.os }}-python-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies and project
run: |
poetry install --no-interaction --no-root
poetry install --no-interaction
if: steps.cache-deps.outputs.cache-hit != 'true'
- name: Run tests with coverage
run: poetry run pytest --cov=ctdfjorder --cov-report=html
- name: Upload coverage report as artifact
if: success() # This step will only run if previous steps succeeded
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: htmlcov