Skip to content

Commit 029969c

Browse files
authored
Merge branch 'tests-workflow' of 'https://github.com/jjmerchante/grimoirelab'
Merges #757 Closes #757
2 parents 385e5a4 + 788deb3 commit 029969c

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/tests.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: End-to-end tests
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'poetry.lock'
7+
- 'tests/**'
8+
- '.github/workflows/tests.yml'
9+
push:
10+
paths:
11+
- 'poetry.lock'
12+
- 'tests/**'
13+
- '.github/workflows/tests.yml'
14+
workflow_dispatch:
15+
16+
jobs:
17+
18+
end-to-end:
19+
strategy:
20+
matrix:
21+
python-version: [3.11, 3.12]
22+
23+
runs-on: ubuntu-latest
24+
name: Python ${{ matrix.python-version }}
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28+
- name: Set up Python ${{ matrix.python-version }}
29+
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: Install poetry
33+
run: |
34+
curl -sSL https://install.python-poetry.org | python3 -
35+
echo "PATH=$HOME/.poetry/bin:$PATH" >> $GITHUB_ENV
36+
- name: Install dependencies
37+
run: |
38+
poetry install --with tests -vvv
39+
- name: Tests
40+
run: |
41+
cd tests && poetry run pytest

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _make_request(self, method: str, uri: str, *args, **kwargs) -> requests.Resp
112112
except requests.HTTPError as e:
113113
if e.response.status_code == 403 and self._refresh_token:
114114
self._refresh_auth_token()
115-
return e.response
115+
last_exception = e
116116
except (requests.ConnectionError, requests.Timeout) as e:
117117
self._reconnect()
118118
last_exception = e

0 commit comments

Comments
 (0)