Skip to content

Commit

Permalink
avoid setup-python api limit
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Jan 25, 2024
1 parent 3853929 commit 541d4fb
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,18 @@ jobs:
fi
gh pr checkout $PR_NUMBER
- uses: actions/setup-python@v5
# Check if python is installed
- name: Check python version
id: python-version
run: python --version

# Set up nf-core/tools
- name: Set up Python 3.11
uses: actions/setup-python@v5
if: steps.python-version.outcome == 'failure'
with:
python-version: "3.11"
cache: "pip"

- name: Install packages
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ jobs:
- uses: actions/checkout@v4
name: Check out source-code repository

# Check if python is installed
- name: Check python version
id: python-version
run: python --version

# Set up nf-core/tools
- name: Set up Python 3.11
uses: actions/setup-python@v5
if: steps.python-version.outcome == 'failure'
with:
python-version: 3.11
cache: pip
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/create-test-lint-wf-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,14 @@ jobs:
- uses: actions/checkout@v4
name: Check out source-code repository

# Check if python is installed
- name: Check python version
id: python-version
run: python --version

- name: Set up Python 3.11
uses: actions/setup-python@v5
if: steps.python-version.outcome == 'failure'
with:
python-version: 3.11

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ jobs:
- uses: actions/checkout@v4
name: Check out source-code repository

# Check if python is installed
- name: Check python version
id: python-version
run: python --version

# Set up nf-core/tools
- name: Set up Python 3.11
uses: actions/setup-python@v5
if: steps.python-version.outcome == 'failure'
with:
python-version: 3.11

Expand Down
15 changes: 14 additions & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ jobs:
- uses: actions/checkout@v4
name: Check out source-code repository

# Check if python is installed, by outputing major and minor version, but not patch version
- name: Check python version
id: python-version
run: echo "python-version=$(python --version)" | sed 's/Python \([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/' >> $GITHUB_OUTPUT

- name: Set up Python ${{ needs.setup.outputs.python-version }}
if: steps.python-version.outputs.python-version == ${{ needs.setup.outputs.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ needs.setup.outputs.python-version }}
Expand Down Expand Up @@ -165,9 +171,16 @@ jobs:
mkdir -p pytest
cd pytest
- uses: actions/checkout@v4
- uses: actions/checkout@v4 #

- name: Check python version
id: python-version
run: python --version

# Set up nf-core/tools
- name: Set up Python 3.11
uses: actions/setup-python@v5
if: steps.python-version.outcome == 'failure'
env:
AGENT_TOOLSDIRECTORY: /opt/actions-runner/_work/tools/tools/
with:
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mypy
myst_parser
pytest-cov
pytest-datafiles
pytest-xdist
responses
ruff
Sphinx
Expand Down

0 comments on commit 541d4fb

Please sign in to comment.