Skip to content

Advanced Mode

Advanced Mode #143

Workflow file for this run

name: Lint
on:
pull_request_target:
concurrency:
group: lint-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
TZ: Europe/Berlin
defaults:
run:
shell: bash -el {0}
jobs:
auto-lint:
name: Formatting
runs-on: ubuntu-22.04
timeout-minutes: 15
outputs:
has_changes: ${{ steps.commit.outputs.committed }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.SEQAN_ACTIONS_PAT }}
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: snakemake
auto-activate-base: false
auto-update-conda: false
channel-priority: strict
environment-file: environment.yml
miniforge-version: latest
- name: Run isort
run: isort .
- name: Run black
run: black .
- name: Run snakefmt
run: snakefmt .
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.SEQAN_ACTIONS_GPG_KEY }}
passphrase: ${{ secrets.SEQAN_ACTIONS_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Commit changes
id: commit
uses: EndBug/add-and-commit@v9
with:
add: .
author_name: seqan-actions[bot]
author_email: [email protected]
message: '[MISC] automatic linting'
lint:
needs: auto-lint
if: needs.auto-lint.outputs.has_changes == 'false'
name: Style Guide
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: snakemake
auto-activate-base: false
auto-update-conda: false
channel-priority: strict
environment-file: environment.yml
miniforge-version: latest
- name: Run pylint
run: pylint .