Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
rernst authored Dec 1, 2023
2 parents 914420b + 20dbeec commit 1f375af
Show file tree
Hide file tree
Showing 109 changed files with 2,393 additions and 2,187 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:

jobs:
MakeTestWorkflow:
runs-on: ubuntu-latest
runs-on: self-hosted
env:
NXF_ANSI_LOG: false
strategy:
Expand All @@ -27,14 +27,14 @@ jobs:
- "latest-everything"
steps:
# Get the repo code
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out source-code repository

# Set up nf-core/tools
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12

- name: Install python dependencies
run: |
Expand All @@ -48,7 +48,9 @@ jobs:
version: ${{ matrix.NXF_VER }}

# Install the Prettier linting tools
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install Prettier
run: npm install -g prettier
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/create-test-lint-wf-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ jobs:
- "template_skip_nf_core_configs.yml"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12

- name: Install python dependencies
run: |
Expand All @@ -52,7 +52,9 @@ jobs:
version: latest-everything

# Install the Prettier linting tools
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install Prettier
run: npm install -g prettier
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:
- "23.04.0"
- "latest-everything"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12

- name: Install python dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out source-code repository

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12

- name: Install python dependencies
run: |
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.nf_core_bot_auth_token }}

Expand All @@ -24,7 +24,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install Prettier
run: npm install -g prettier @prettier/plugin-php
Expand All @@ -38,10 +40,10 @@ jobs:
# Override to remove the default --check flag so that we make changes
options: "--color"

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
- name: python-isort
uses: isort/isort-action@v1.0.0
with:
Expand Down
59 changes: 42 additions & 17 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ concurrency:

jobs:
EditorConfig:
runs-on: ubuntu-latest
runs-on: ["self-hosted"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
Expand All @@ -28,11 +30,13 @@ jobs:
run: editorconfig-checker -exclude README.md $(git ls-files | grep -v 'test\|.py\|md\|json\|yml\|yaml\|html\|css\|Makefile')

Prettier:
runs-on: ubuntu-latest
runs-on: ["self-hosted"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install Prettier
run: npm install -g prettier
Expand All @@ -41,9 +45,9 @@ jobs:
run: prettier --check ${GITHUB_WORKSPACE}

PythonBlack:
runs-on: ubuntu-latest
runs-on: ["self-hosted"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check code lints with Black
uses: psf/black@stable
Expand Down Expand Up @@ -71,29 +75,50 @@ jobs:
allow-repeats: false

isort:
runs-on: ubuntu-latest
runs-on: ["self-hosted"]
steps:
- name: Check out source-code repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
- name: python-isort
uses: isort/isort-action@v1.1.0
with:
isortVersion: "latest"
requirementsFiles: "requirements.txt requirements-dev.txt"

static-type-check:
runs-on: ubuntu-latest
runs-on: ["self-hosted"]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: pip install mypy types-PyYAML
python-version: 3.12
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip -r requirements-dev.txt
pip install -e .
- name: Cache nf-test installation
id: cache-software
uses: actions/cache@v3
with:
path: |
/usr/local/bin/nf-test
/home/runner/.nf-test/nf-test.jar
key: ${{ runner.os }}-${{ env.NFTEST_VER }}-nftest

- name: Install nf-test
if: steps.cache-software.outputs.cache-hit != 'true'
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/
- name: Get Python changed files
id: changed-py-files
uses: tj-actions/changed-files@v23
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push_dockerhub_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub (dev)
runs-on: ubuntu-latest
runs-on: self-hosted
# Only run for the nf-core repo, for releases and merged PRs
if: ${{ github.repository == 'nf-core/tools' }}
env:
Expand All @@ -23,7 +23,7 @@ jobs:
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build nfcore/tools:dev docker image
run: docker build --no-cache . -t nfcore/tools:dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push_dockerhub_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build nfcore/tools:latest docker image
run: docker build --no-cache . -t nfcore/tools:latest
Expand Down
57 changes: 49 additions & 8 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,63 @@ env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
pytest:
runs-on: ${{ matrix.runner }}
setup:
runs-on: ["ubuntu-latest"]
strategy:
matrix:
python-version: ["3.8", "3.11"]
python-version: ["3.8", "3.12"]
runner: ["ubuntu-latest"]
include:
- runner: "ubuntu-20.04"
python-version: "3.8"

steps:
- uses: actions/checkout@v3
name: Check out source-code repository
- name: Check conditions
id: conditions
run: echo "run-tests=${{ github.ref == 'refs/heads/master' || (matrix.runner == 'ubuntu-20.04' && matrix.python-version == '3.8') }}" >> $GITHUB_ENV

- name: Check out source-code repository
uses: actions/checkout@v4
if: ${{ env.run-tests == 'true' }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
if: ${{ env.run-tests == 'true' }}
outputs:
python-version: ${{ matrix.python-version }}
runner: ${{ matrix.runner }}
run-tests: ${{ env.run-tests }}

test:
name: Test with Python ${{ needs.setup.outputs.python-version }} on ${{ needs.setup.outputs.runner }}
needs: setup
if: ${{ needs.setup.outputs.run-tests == 'true' }}
runs-on: ${{ needs.setup.outputs.runner }}
steps:
- uses: actions/checkout@v2
name: Check out source-code repository

- name: Set up Python ${{ needs.setup.outputs.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ needs.setup.outputs.python-version }}
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip -r requirements-dev.txt
pip install -e .
- name: Downgrade git to the Ubuntu official repository's version
if: ${{ matrix.runner == 'ubuntu-20.04' && matrix.python-version == '3.8' }}
if: ${{ needs.setup.outputs.runner == 'ubuntu-20.04' && needs.setup.outputs.python-version == '3.8' }}
run: |
sudo apt update
sudo apt remove git git-man
sudo apt remove -y git git-man
sudo add-apt-repository --remove ppa:git-core/ppa
sudo apt install git
sudo apt install -y git
- name: Get current date
id: date
run: echo "date=$(date +'%Y-%m')" >> $GITHUB_ENV
Expand All @@ -64,6 +90,21 @@ jobs:
with:
version: "latest-everything"

- name: Cache nf-test installation
id: cache-software
uses: actions/cache@v3
with:
path: |
/usr/local/bin/nf-test
/home/runner/.nf-test/nf-test.jar
key: ${{ runner.os }}-${{ env.NFTEST_VER }}-nftest

- name: Install nf-test
if: steps.cache-software.outputs.cache-hit != 'true'
run: |
wget -qO- https://code.askimed.com/install/nf-test | bash
sudo mv nf-test /usr/local/bin/
- name: Test with pytest
run: python3 -m pytest tests/ --color=yes --cov-report=xml --cov-config=.github/.coveragerc --cov=nf_core

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rich-codex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
matrix: ${{fromJson(needs.get-pipelines.outputs.matrix)}}
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out nf-core/tools

- uses: actions/checkout@v3
- uses: actions/checkout@v4
name: Check out nf-core/${{ matrix.pipeline }}
with:
repository: nf-core/${{ matrix.pipeline }}
Expand All @@ -48,10 +48,10 @@ jobs:
path: nf-core/${{ matrix.pipeline }}
fetch-depth: "0"

- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12

- name: Install python dependencies
run: |
Expand Down
Loading

0 comments on commit 1f375af

Please sign in to comment.