perf: autobump bio/ngscheckmate/ncm/environment.yaml #10131
This file contains hidden or 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
| name: Code quality | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - 'CHANGELOG.md' | |
| jobs: | |
| formatting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup mamba | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| activate-environment: fmt | |
| channels: "conda-forge, bioconda" | |
| miniforge-version: latest | |
| - name: Setup environment | |
| shell: bash -el {0} | |
| run: | | |
| conda config --set channel_priority strict | |
| conda install -n fmt -y black snakefmt | |
| - name: Check Python formatting | |
| shell: bash -el {0} | |
| run: | | |
| black --check */*/*/wrapper.py */*/wrapper.py | |
| # TODO reactivate once comment errors are fixed | |
| # - name: Check Snakemake formatting | |
| # run: | | |
| # export PATH="/usr/share/miniconda/bin:$PATH" | |
| # source activate fmt | |
| # snakefmt --check $(git diff origin/master --name-only | grep Snakefile) | |
| linting: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup mamba | |
| uses: conda-incubator/setup-miniconda@v2 | |
| with: | |
| activate-environment: snakemake | |
| channels: "conda-forge, bioconda" | |
| miniforge-version: latest | |
| - name: Setup Snakemake environment | |
| shell: bash -el {0} | |
| run: | | |
| conda config --set channel_priority strict | |
| conda install -n snakemake -y snakemake snakemake-minimal snakemake-storage-plugin-http | |
| - name: Fetch master | |
| run: | | |
| git fetch origin master | |
| - name: Linting | |
| shell: bash -el {0} | |
| run: | | |
| declare -i ERRORS=0 | |
| # get all modified and added files, not those that are deleted | |
| for f in $(git diff origin/master --name-only --diff-filter=d | grep Snakefile) | |
| do | |
| echo "Linting $f" | |
| (cd $(dirname $f) && snakemake --lint) | |
| ERRORS+=$? | |
| done | |
| if (( $ERRORS > 0 )) | |
| then | |
| echo "There are some lints above. Please fix them." | |
| exit 1 | |
| fi |