@@ -13,10 +13,11 @@ jobs:
1313 test-cli :
1414 name : Test CLI Functionality
1515 runs-on : ubuntu-latest
16+ timeout-minutes : 30
1617
1718 strategy :
1819 matrix :
19- python-version : ["3.8", "3. 9", "3.10", "3.11", "3.12"]
20+ python-version : ["3.9", "3.10", "3.11", "3.12"]
2021
2122 steps :
2223 - name : Checkout code
2829 python-version : ${{ matrix.python-version }}
2930
3031 - name : Cache pip dependencies
31- uses : actions/cache@v3
32+ uses : actions/cache@v4
3233 with :
3334 path : ~/.cache/pip
3435 key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}
@@ -58,17 +59,18 @@ jobs:
5859
5960 - name : Run tests
6061 run : |
61- pytest tests/ -v --cov=pygetpapers --cov-report=xml --cov-report=term-missing
62+ pytest tests/ -v --cov=pygetpapers --cov-report=xml --cov-report=term-missing --timeout=300
6263
6364 - name : Upload coverage to Codecov
64- uses : codecov/codecov-action@v3
65+ uses : codecov/codecov-action@v4
6566 with :
6667 file : ./coverage.xml
6768 fail_ci_if_error : false
6869
6970 test-streamlit :
7071 name : Test Streamlit UI
7172 runs-on : ubuntu-latest
73+ timeout-minutes : 20
7274
7375 steps :
7476 - name : Checkout code
8082 python-version : ${{ env.PYTHON_VERSION }}
8183
8284 - name : Cache pip dependencies
83- uses : actions/cache@v3
85+ uses : actions/cache@v4
8486 with :
8587 path : ~/.cache/pip
8688 key : ${{ runner.os }}-pip-${{ env.PYTHON_VERSION }}-streamlit-${{ hashFiles('**/requirements.txt') }}
@@ -116,6 +118,7 @@ jobs:
116118 name : Build Package
117119 runs-on : ubuntu-latest
118120 needs : [test-cli, test-streamlit]
121+ timeout-minutes : 15
119122
120123 steps :
121124 - name : Checkout code
@@ -136,7 +139,7 @@ jobs:
136139 python -m build
137140
138141 - name : Upload build artifacts
139- uses : actions/upload-artifact@v3
142+ uses : actions/upload-artifact@v4
140143 with :
141144 name : dist-files
142145 path : dist/
@@ -146,6 +149,7 @@ jobs:
146149 runs-on : ubuntu-latest
147150 needs : [test-cli, test-streamlit]
148151 if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/v20'
152+ timeout-minutes : 15
149153
150154 steps :
151155 - name : Checkout code
@@ -168,7 +172,7 @@ jobs:
168172 mkdir -p docs/_build
169173
170174 # Copy Streamlit documentation to docs
171- cp README_STREAMLIT.md docs/
175+ cp README_STREAMLIT.md docs/ || echo "README_STREAMLIT.md not found"
172176 cp -r docs/* docs/_build/ || echo "No existing docs to copy"
173177
174178 - name : Deploy to GitHub Pages
@@ -181,6 +185,7 @@ jobs:
181185 security-scan :
182186 name : Security Scan
183187 runs-on : ubuntu-latest
188+ timeout-minutes : 15
184189
185190 steps :
186191 - name : Checkout code
@@ -205,7 +210,7 @@ jobs:
205210 safety check --json --output safety-report.json || true
206211
207212 - name : Upload security reports
208- uses : actions/upload-artifact@v3
213+ uses : actions/upload-artifact@v4
209214 with :
210215 name : security-reports
211216 path : |
0 commit comments