Skip to content

Commit

Permalink
Add mosaichunter github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ellendejong committed Sep 20, 2024
1 parent 6b836e8 commit b412262
Show file tree
Hide file tree
Showing 4 changed files with 219 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/moisaichunter_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: MosaicHunter Lint
on:
pull_request:
paths: MosaicHunter/**

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
60 changes: 60 additions & 0 deletions .github/workflows/moisaichunter_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Source: https://github.com/marketplace/actions/install-poetry-action
name: MosaicHunter Test
on:
pull_request:
paths: MosaicHunter/**

jobs:
pytest:
runs-on: ubuntu-latest
defaults:
run:
working-directory: MosaicHunter/1.0.0/
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.11.5'
#----------------------------------------------
# install & configure poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv_mosaichunter-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install root project
#----------------------------------------------
- name: Install project
run: poetry install --no-interaction
#----------------------------------------------
# run pytest
#----------------------------------------------
- name: Run tests
run: |
source .venv/bin/activate
pytest .
124 changes: 124 additions & 0 deletions MosaicHunter/1.0.0/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions MosaicHunter/1.0.0/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[tool.poetry]
name = "mosaichunter"
version = "1.0.0"
description = ""
authors = ["Your Name <[email protected]>"]
license = "MIT"
package-mode = false

[tool.poetry.dependencies]
python = "^3.11"
iniconfig = "2.0.0"
packaging = "23.2"
pluggy = "1.4.0"
pysam = "0.22.0"
pytest = "8.0.2"
pytest-datadir = "^1.5.0"

[tool.ruff]
line-length = 127
indent-width = 4

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

0 comments on commit b412262

Please sign in to comment.