Skip to content

Commit e919207

Browse files
committed
ci fixes
1 parent 8a52e86 commit e919207

File tree

3 files changed

+8
-96
lines changed

3 files changed

+8
-96
lines changed

.github/workflows/ci-cd.yaml

Lines changed: 1 addition & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
uv-${{ runner.os }}
7777
7878
- name: Install redis, pdf2text and ocr dependencies (Linux w/latest Python)
79+
# Redis easily installable on Unbuntu
7980
# Do full install and testing of pdf2text and ocr only on latest Python version
8081
if: ${{ matrix.python-version == '3.14' && runner.os == 'Linux' }}
8182
# https://github.com/jalan/pdftotext#os-dependencies
@@ -161,96 +162,8 @@ jobs:
161162
- name: Minimize uv cache
162163
run: uv cache prune --ci
163164

164-
# test_windows:
165-
# # No redis (only works on Ubuntu), only run on latest python-version
166-
# name: "Test ${{ matrix.python-version }} on ${{ matrix.os }}"
167-
# runs-on: ${{ matrix.os }}
168-
# # Identifies any jobs that must complete successfully before this job will run
169-
# # needs: [pre-commit]
170-
# # A strategy creates a build matrix for your jobs. You can define different variations to run each job in
171-
# strategy:
172-
# matrix:
173-
# # Python versions at https://github.com/actions/python-versions/releases
174-
# python-version: ['3.12']
175-
# os: [windows-latest]
176-
#
177-
# env:
178-
# commitmsg: ${{ github.event.head_commit.message }} # only available at check-out; becomes env.commitmsg
179-
# TELEGRAM_TOKEN: ${{ secrets.telegram_token }} # for telegram testing
180-
# REDIS_URI: redis://localhost:6379
181-
#
182-
# steps:
183-
# # Checks out a copy of the repository per https://github.com/actions/checkout
184-
# - name: Check out repo
185-
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
186-
#
187-
# # Build Python and packages per https://github.com/actions/setup-python
188-
# - name: Set up Python ${{ matrix.python-version }}
189-
# uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
190-
# with:
191-
# python-version: ${{ matrix.python-version }}
192-
# allow-prereleases: true
193-
# cache: 'pip'
194-
# cache-dependency-path: |
195-
# requirements.txt
196-
# tests/requirements_pytest.txt
197-
#
198-
# - name: Upgrade pip etc.
199-
# run: |
200-
# pip install --upgrade pip setuptools wheel
201-
#
202-
## ISSUE WITH THE BELOW:
203-
## Hangs at start /wait "" Miniconda3-latest-Windows-x86_64.exe /RegisterPython=0 /D=%temp%\Miniconda3
204-
## - name: Install pdf2text and ocr dependencies (Python 3.11)
205-
## # do full install and testing of pdf2text and ocr only on latest Python version
206-
## if: matrix.python-version == '3.11'
207-
## run: |
208-
## cd %temp%
209-
## dir
210-
## rem # install conda per https://conda.io/projects/conda/en/stable/user-guide/install/windows.html
211-
## curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O
212-
## powershell Get-FileHash Miniconda3-latest-Windows-x86_64.exe -Algorithm SHA256
213-
## echo hash should match the one at https://docs.conda.io/projects/miniconda/en/latest/
214-
## rem # below, /S = silent mode
215-
## start /wait "" Miniconda3-latest-Windows-x86_64.exe /RegisterPython=0 /D=%temp%\Miniconda3
216-
## del Miniconda3-latest-Windows-x86_64.exe /f
217-
## call "%temp%\Miniconda3\conda" install -y -c conda-forge poppler
218-
## rem # *** get latest tesseract filename from https://digi.bib.uni-mannheim.de/tesseract/?C=M;O=D
219-
## set TESSERACT=tesseract-ocr-w64-setup-5.3.1.20230401.exe
220-
## curl https://digi.bib.uni-mannheim.de/tesseract/%TESSERACT% -O
221-
## start /wait "" %TESSERACT% /S
222-
## del %TESSERACT% /f
223-
## pip install --upgrade keyring pdftotext Pillow pytesseract
224-
## shell: cmd
225-
#
226-
# - name: Install all other dependencies
227-
## if: matrix.python-version <= '3.11'
228-
# run: |
229-
# pip install --upgrade coveralls -r requirements.txt -r tests/requirements_pytest.txt
230-
#
231-
## - name: Install all other dependencies (Python 3.12)
232-
## if: matrix.python-version > '3.11'
233-
## run: |
234-
## pip install --upgrade greenlet==3.0.0a1 coveralls -r requirements.txt -r tests/requirements_pytest.txt
235-
#
236-
# - name: Run tests
237-
# # workaround for Windows fatal exception: access violation
238-
# # python -m required to get it to run in the correct directory; '>' folded style scalar (allows splitting line)
239-
# run: >
240-
# python -m pytest -v --cov=./ --cov-report=term tests/ -p no:faulthandler
241-
#
242-
# - name: Upload coverage data to coveralls.io (parallel)
243-
# run: coveralls --service=github
244-
# env:
245-
# GITHUB_TOKEN: ${{ secrets.github_token }}
246-
# COVERALLS_FLAG_NAME: tests-${{ matrix.python-version }}-${{ matrix.os }}
247-
# COVERALLS_PARALLEL: true
248-
# continue-on-error: true
249-
250165
coveralls:
251166
name: Completion -> coveralls.io
252-
# needs: [test_ubuntu, test_macos, test_windows]
253-
# needs: [test_ubuntu, test_macos]
254167
needs: [test]
255168
runs-on: ubuntu-latest
256169
continue-on-error: true
@@ -271,8 +184,6 @@ jobs:
271184
permissions:
272185
contents: write # IMPORTANT: this permission is mandatory for trusted publishing
273186
id-token: write # IMPORTANT: this permission is mandatory for create GitHub release
274-
# needs: [test_ubuntu, test_macos, test_windows]
275-
# needs: [test_ubuntu, test_macos]
276187
needs: [test]
277188
# ref https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context
278189
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

CHANGELOG.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ Fixed
5656

5757
Internals
5858
`````````
59+
* Implemented testing for Windows (in addition to Linux and macOS)
5960
* Implemented testing for Python 3.14t (GIL-lock-free).
6061
* Additional code security improvements.
61-
* Removed Gemini Github Actions workflows (trial)
62+
* Removed Gemini Github Actions workflows (beta trial)
6263
* In URL jobs, the ``TransientHTTPError`` Exception will be raised when a transient HTTP error is detected, paving the
6364
way for a new ``ignore_transient_error`` directive (not yet implemented) requested in #`119
6465
<https://github.com/mborsetti/webchanges/issues/119>`__.
@@ -71,9 +72,9 @@ Internals
7172
- 503 Service Unavailable
7273
- 504 Gateway Timeout
7374

74-
In addition, for ``browser: true``, browser errors starting with ``net::`` and corresponding to the range 100-199
75-
(Connection related errors) are considered to be transient; they are listed at
76-
https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h.
75+
For jobs with ``browser: true``, browser errors starting with ``net::`` and corresponding to the range 100-199
76+
(Connection related errors) are also considered to be transient (full list at
77+
https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h).
7778

7879

7980
Version 3.31.4

tests/test_filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_execute_inherits_environment_but_does_not_modify_it() -> None:
147147
if os.name != 'nt':
148148
assert str(data).rstrip('"') == 'input-stringparent-process/test\n'
149149
else:
150-
assert str(data).rstrip('"') == 'parent-process/test'
150+
assert str(data).rstrip('"') == 'parent-process/test\n'
151151

152152
# Check that the outside variable wasn't overwritten by the filter
153153
assert os.environ['URLWATCH_JOB_NAME'] == 'should-not-be-overwritten'
@@ -181,7 +181,7 @@ def test_shellpipe_inherits_environment_but_does_not_modify_it() -> None:
181181
if os.name != 'nt':
182182
assert str(data).rstrip('"') == 'input-stringparent-process/test\n'
183183
else:
184-
assert str(data).rstrip('"') == 'parent-process/test'
184+
assert str(data).rstrip('"') == 'parent-process/test\n'
185185

186186
# Check that the outside variable wasn't overwritten by the filter
187187
assert os.environ['URLWATCH_JOB_NAME'] == 'should-not-be-overwritten'

0 commit comments

Comments
 (0)