Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
31 changes: 12 additions & 19 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,27 @@ jobs:
release-type: python
package-name: snakemake-interface-executor-plugins

publish:
publish-pypi:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v2
with:
python-version: "3.11"

- name: Install poetry
run: pip install poetry

- name: Determine dependencies
run: poetry lock
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.8.3
with:
python-version: "3.11"
cache: poetry
environments: publish
pixi-version: v0.42.1

- name: Install Dependencies using Poetry
- name: Build source and wheel distribution + check build
# this will build the source and wheel into the dist/ directory
run: |
poetry install
pixi run --environment publish check-build

- name: Publish to PyPi
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD
104 changes: 35 additions & 69 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,88 +7,54 @@ on:
pull_request:
branches-ignore: []

permissions:
contents: read
checks: write
issues: write
pull-requests: write

jobs:
formatting:
quality-control:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install poetry
run: pip install poetry

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry
uses: actions/checkout@v4

- name: Install Dependencies using Poetry
run: poetry install

- name: Check formatting
run: poetry run black --check .

linting:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v3

- uses: actions/setup-python@v4
- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.8.3
with:
python-version: "3.11"

- name: Install poetry
run: pip install poetry
environments: dev
pixi-version: v0.42.1
cache: true

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry
- name: Ruff Format
if: always()
run: |
pixi run --environment dev format --check

- name: Install Dependencies using Poetry
run: poetry install
- name: Ruff lint
if: always()
run: |
pixi run --environment dev lint --diff
# - name: Mypy
# if: always()
# run: |
# pixi run --environment dev type-check

- name: Check code
run: poetry run flake8
- name: Collect QC
run: echo "All quality control checks passed"

testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v4
- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.8.3
with:
python-version: "3.11"

- name: Install poetry
run: pip install poetry

- name: Determine dependencies
run: poetry lock

- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry

- name: Install dependencies
run: |
pip install connection-pool # because it is incompatible with poetry
poetry install

- name: Run pytest
run: poetry run coverage run -m pytest tests/tests.py
environments: dev
pixi-version: v0.42.1
cache: true

- name: Run Coverage
run: poetry run coverage report -m
- name: Run tests
run: pixi run --environment dev test --show-capture=all -s -vv
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,7 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

poetry.lock
poetry.lock
# pixi environments
.pixi
*.egg-info
Loading
Loading