🐍 add pre-commit hook to remove unused imports mentioned in Issue #330 #468
Workflow file for this run
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
name: nf-core linting | |
# This workflow is triggered on pushes and PRs to the repository. | |
# It runs the `nf-core lint` and markdown lint tests to ensure that the code meets the nf-core guidelines | |
on: | |
pull_request: | |
release: | |
types: [published] | |
jobs: | |
nf-core: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@v2 | |
- name: Install Nextflow | |
env: | |
CAPSULE_LOG: none | |
run: | | |
wget -qO- get.nextflow.io | bash | |
sudo mv nextflow /usr/local/bin/ | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: "3.6" | |
architecture: "x64" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install nf-core==2.2 | |
- name: Run nf-core lint | |
env: | |
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }} | |
run: nf-core -l lint_log.txt lint --dir ${GITHUB_WORKSPACE} --markdown lint_results.md | |
- name: Save PR number | |
if: ${{ always() }} | |
run: echo ${{ github.event.pull_request.number }} > PR_number.txt | |
- name: Upload linting log file artifact | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linting-logs | |
path: | | |
lint_log.txt | |
lint_results.md | |
PR_number.txt |