-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mosaichunter github actions workflow
- Loading branch information
1 parent
6b836e8
commit b412262
Showing
4 changed files
with
219 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |