Skip to content

Fix prefetch num_workers < 0 #45

Fix prefetch num_workers < 0

Fix prefetch num_workers < 0 #45

Workflow file for this run

name: Tests
run-name: "${{ github.event.head_commit.message }}"
on: [push, pull_request]
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- name: ufmt
uses: omnilib/ufmt@action-v1
with:
path: seqtools
python-version: "3.11"
unit-tests:
runs-on: ubuntu-latest
needs: check-formatting
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
- name: Pytest
run: pytest --cov=seqtools --cov-report= -v tests
- name: Rename coverage file
run: mv .coverage .coverage.${{ matrix.python-version }}
- name: Store coverage report
uses: actions/upload-artifact@v3
with:
name: coverage-report
path: .coverage.${{ matrix.python-version }}
doctests:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
sudo apt install -y pandoc
python -m pip install --upgrade pip
pip install -e .[documentation]
- name: Doctests
run: python -m sphinx -b doctest docs docs/_build
coverage:
runs-on: ubuntu-latest
needs: unit-tests
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coverage[toml]
- name: Download coverage reports
uses: actions/download-artifact@v3
with:
name: coverage-report
- name: Combine coverage files
run: |
coverage combine
coverage xml
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Check coverage
run: coverage report --fail-under=90