Add more ruff rules (B, PTH, RSE, SIM, C4, BLE, A) #10658
Workflow file for this run
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: Create a pipeline and test it | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| # https://docs.renovatebot.com/key-concepts/automerge/#branch-vs-pr-automerging | |
| - "renovate/**" # branches Renovate creates | |
| paths-ignore: | |
| - "docs/**" | |
| - "CHANGELOG.md" | |
| pull_request: | |
| paths-ignore: | |
| - "docs/**" | |
| - "CHANGELOG.md" | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| # Cancel if a newer run is started | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| RunTestWorkflow: | |
| runs-on: | |
| - runs-on=${{ github.run_id }}-run-test-worfklow | |
| - runner=4cpu-linux-x64 | |
| env: | |
| NXF_ANSI_LOG: false | |
| strategy: | |
| matrix: | |
| NXF_VER: | |
| - "25.04.0" | |
| - "latest-everything" | |
| steps: | |
| - name: go to working directory | |
| run: | | |
| mkdir -p create-test-wf | |
| cd create-test-wf | |
| export NXF_WORK=$(pwd) | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| name: Check out source-code repository | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7 | |
| with: | |
| enable-cache: true | |
| - name: Install python dependencies | |
| run: uv sync | |
| - name: Install Nextflow | |
| uses: nf-core/setup-nextflow@v2 | |
| with: | |
| version: ${{ matrix.NXF_VER }} | |
| - name: Install nf-test | |
| uses: nf-core/setup-nf-test@v1 | |
| with: | |
| version: "0.9.4" | |
| install-pdiff: true | |
| - name: Run nf-core/tools to create pipeline | |
| run: | | |
| mkdir create-test-wf && cd create-test-wf | |
| export NXF_WORK=$(pwd) | |
| uv run nf-core --log-file log.txt pipelines create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface" | |
| - name: copy snapshot file | |
| run: | | |
| cp ${{ github.workspace }}/.github/snapshots/default.nf.test.snap create-test-wf/nf-core-testpipeline/tests/default.nf.test.snap | |
| - name: Run nf-test | |
| shell: bash | |
| run: | | |
| cd create-test-wf/nf-core-testpipeline | |
| nf-test test \ | |
| --profile=+docker \ | |
| --verbose \ | |
| --tap=test.tap \ | |
| --ci | |
| # Save the absolute path of the test.tap file to the output | |
| echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT | |
| - name: Upload log file artifact | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 | |
| with: | |
| name: nf-core-log-file-${{ matrix.NXF_VER }} | |
| path: create-test-wf/log.txt | |
| - name: Cleanup work directory | |
| # cleanup work directory | |
| run: | | |
| sudo rm -rf create-test-wf | |
| sudo rm -rf /home/ubuntu/tests/ | |
| if: always() | |
| shell: bash |