Skip to content

Commit

Permalink
feat(update): Migrate to Poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikstranneheim committed Sep 4, 2024
1 parent ce26261 commit 8b6f1b1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 99 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/main.yml → .github/workflows/Crunchy_CI.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Build
name: Crunchy CI
on: [push, pull_request]

jobs:
build:
test-coverage:
name: Test Crunchy (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ubuntu-latest
strategy:
Expand All @@ -15,6 +15,11 @@ jobs:
- name: Git checkout
uses: actions/[email protected]

- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false

- name: Get Conda
uses: conda-incubator/[email protected]
with:
Expand All @@ -32,15 +37,16 @@ jobs:
run: |
conda install -c bioconda samtools
- name: Install dependencies
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
python setup.py install
- name: Install Dependencies
run: poetry install

- name: Test with pytest
shell: bash -l {0}
- name: Unit tests and coverage
run: |
pip install pytest
pip install pytest-mock
py.test -rxs tests/
poetry run pytest --cov=./ --cov-report xml --cov-report term
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
58 changes: 27 additions & 31 deletions .github/workflows/build_and_publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
name: Publish to PyPI

on:
release:
types:
- created
release:
types:
- created

jobs:
build-n-publish:
name: Build and publish Python distribution to PyPI
runs-on: ubuntu-18.04
steps:
- name: Check out git repository
uses: actions/checkout@v2.5.0
build-n-publish:
name: Build and publish Python distribution to PyPI
runs-on: ubuntu-latest
steps:
- name: Check out git repository
uses: actions/checkout@v4.1.1

- name: Set up Python
uses: actions/setup-python@v4.3.1
with:
python-version: "3.10"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install build tools
run: >-
python -m
pip install
wheel
twine
--user
- name: Build a binary wheel and a source tarball
run: >-
python
setup.py
sdist
bdist_wheel
- name: Publish distribution 📦 to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false

- name: Build and Publish Distribution to PyPI 📦
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.pypi_password }}
POETRY_REQUESTS_TIMEOUT: 60
run: |
poetry publish --no-interaction --build \
--username $PYPI_USERNAME \
--password $PYPI_PASSWORD
56 changes: 0 additions & 56 deletions .github/workflows/workflow-master.yaml

This file was deleted.

0 comments on commit 8b6f1b1

Please sign in to comment.