Skip to content

Commit

Permalink
init pytest action
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamtaranto committed Jan 4, 2025
1 parent e92fa50 commit c17ed8e
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Python Tests

on: [pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.12"]

steps:
# Checkout the latest commit associated with the PR
- uses: actions/checkout@v4

- name: Debug matrix value
run: echo "Python version is ${{ matrix.python-version }}"

# Set up Miniconda
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true # Optional: update Conda to the latest version
python-version: ${{ matrix.python-version }}

# Install any additional dependencies not included in the pyproject.toml file
- name: Install additional dependencies
run: |
conda install -y -c conda-forge -c bioconda bedtools imagemagick libmagic wand
pip install '.[tests]' # Install all dependencies, including test-specific ones
shell: bash -l {0}

# Run pytest on the specified directory
- name: Run tests
run: |
pytest -p no:warnings tests
shell: bash -l {0}

0 comments on commit c17ed8e

Please sign in to comment.