-
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.
- Loading branch information
Showing
3 changed files
with
65 additions
and
197 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,64 @@ | ||
name: Style check | ||
|
||
on: [push] | ||
|
||
env: | ||
POETRY_VERSION: 1.8.2 | ||
|
||
jobs: | ||
toolkit: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
PYTHON_VERSION: ["3.11", "3.12"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python {{ "${{ matrix.PYTHON_VERSION }}" }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: {{ "${{ matrix.PYTHON_VERSION }}" }} | ||
|
||
- name: Get full Python version | ||
id: full-python-version | ||
shell: bash | ||
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT | ||
|
||
- name: Install poetry | ||
run: | | ||
python -m pip install --upgrade pipx | ||
pipx install poetry=={{ "${{env.POETRY_VERSION}}" }} | ||
- name: Set up cache | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: .venv | ||
key: venv-{{ "${{ runner.os }}" }}-{{ "${{ steps.full-python-version.outputs.version }}" }}-{{ "${{ hashFiles('**/poetry.lock') }}" }} | ||
|
||
- name: Ensure cache is healthy | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
shell: bash | ||
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv | ||
|
||
- name: Install the library | ||
run: poetry install -v | ||
|
||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
micromamba-version: '1.5.6-0' | ||
environment-name: test | ||
environment-file: environment.yml | ||
cache-environment: true | ||
post-cleanup: 'all' | ||
|
||
- name: Bash style checking | ||
shell: micromamba-shell {0} | ||
run: | | ||
bash shellcheck -x scripts/*.sh | ||
- name: Snakemake style checking | ||
shell: micromamba-shell {0} | ||
run: | | ||
snakefmt --line-length 100 workflows/*.smk |
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
This file was deleted.
Oops, something went wrong.