Skip to content

Commit 0ce7de5

Browse files
committed
fixed pyton test case
1 parent c8c7e7e commit 0ce7de5

File tree

5 files changed

+362
-458
lines changed

5 files changed

+362
-458
lines changed

.github/workflows/python-publish.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,21 +37,10 @@ jobs:
3737
cd scrapegraph-py
3838
pip install -e .
3939
40-
- name: Run tests with coverage
40+
- name: Run mocked tests with coverage
4141
run: |
4242
cd scrapegraph-py
43-
python -m pytest tests/ -v --cov=scrapegraph_py --cov-report=xml --cov-report=term-missing
44-
45-
- name: Run real API tests (if API key available)
46-
run: |
47-
cd scrapegraph-py
48-
if [ -n "$SGAI_API_KEY" ]; then
49-
python -m pytest tests/test_real_apis.py -v --tb=short
50-
else
51-
echo "SGAI_API_KEY not set, skipping real API tests"
52-
fi
53-
env:
54-
SGAI_API_KEY: ${{ secrets.SGAI_API_KEY }}
43+
python -m pytest tests/test_mocked_apis.py -v --cov=scrapegraph_py --cov-report=xml --cov-report=term-missing
5544
5645
deploy:
5746
needs: test

.github/workflows/test.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,10 @@ jobs:
3636
cd scrapegraph-py
3737
pip install -e .
3838
39-
- name: Run tests with coverage
39+
- name: Run mocked tests with coverage
4040
run: |
4141
cd scrapegraph-py
42-
python -m pytest tests/ -v --cov=scrapegraph_py --cov-report=xml --cov-report=term-missing
43-
44-
- name: Run real API tests (if API key available)
45-
run: |
46-
cd scrapegraph-py
47-
if [ -n "$SGAI_API_KEY" ]; then
48-
python -m pytest tests/test_real_apis.py -v --tb=short
49-
else
50-
echo "SGAI_API_KEY not set, skipping real API tests"
51-
fi
52-
env:
53-
SGAI_API_KEY: ${{ secrets.SGAI_API_KEY }}
42+
python -m pytest tests/test_mocked_apis.py -v --cov=scrapegraph_py --cov-report=xml --cov-report=term-missing
5443
5544
- name: Upload coverage to Codecov
5645
uses: codecov/codecov-action@v3

api-keys-to-remove.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)