Skip to content

Commit 53e50dc

Browse files
authored
Merge pull request #369 from SynBioDex/bug/IDT_rate_limits
New dedicated job for IDT API tests
2 parents c006dfa + 3f1d1ba commit 53e50dc

File tree

1 file changed

+29
-4
lines changed

1 file changed

+29
-4
lines changed

.github/workflows/python-app.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ on:
1212

1313
jobs:
1414
build:
15-
env:
16-
IDT_CREDENTIALS: ${{ secrets.IDT_CREDENTIALS }}
1715
runs-on: ${{ matrix.os }}
1816
strategy:
1917
matrix:
@@ -43,8 +41,35 @@ jobs:
4341
- name: Show Node.js version
4442
run: |
4543
node --version
46-
- name: Test with pytest
44+
- name: Test with pytest (excluding external API tests)
45+
run: |
46+
pip install .
47+
pytest --ignore=test/test_docstr_coverage.py --ignore=test/test_calculate_complexity_scores.py -s
48+
49+
# Separate job for external API tests that only runs on one platform to avoid rate limiting
50+
# This prevents multiple simultaneous API calls to external services (like IDT complexity scoring)
51+
# that could result in rate limiting or service failures (fixes issue #368)
52+
external-api-tests:
53+
runs-on: ubuntu-latest
54+
env:
55+
IDT_CREDENTIALS: ${{ secrets.IDT_CREDENTIALS }}
56+
steps:
57+
- uses: actions/checkout@v4
58+
- name: Set up Python 3.11
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: '3.11'
62+
- name: Install dependencies
63+
run: |
64+
python -m pip install --upgrade pip
65+
python -m pip install pytest
66+
- name: Setup Graphviz
67+
uses: ts-graphviz/setup-graphviz@v2
68+
- name: Show Node.js version
69+
run: |
70+
node --version
71+
- name: Test external API functionality (complexity scoring)
4772
run: |
4873
pip install .
4974
echo "$IDT_CREDENTIALS" > test_secret_idt_credentials.json
50-
pytest --ignore=test/test_docstr_coverage.py -s
75+
pytest test/test_calculate_complexity_scores.py -s

0 commit comments

Comments
 (0)