Skip to content

Commit 1a48be3

Browse files
committed
Fixed tests to run on push only for main
1 parent 53a74f3 commit 1a48be3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Python Tests
22

33
on:
44
push:
5+
branches:
6+
- main
57
pull_request:
68

79
concurrency:
@@ -19,7 +21,7 @@ jobs:
1921
tests:
2022
strategy:
2123
matrix:
22-
python-version: ['3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
24+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.9', 'pypy-3.10']
2325
runs-on: ubuntu-latest
2426
steps:
2527
- name: Checkout code

tests/test_cred_provider.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def on_next(token: TokenInterface):
5050

5151
# Run token manager
5252
credential_provider.get_credentials()
53-
sleep(0.5)
53+
sleep(1)
5454

5555
assert len(tokens) > 0
5656

@@ -75,7 +75,7 @@ def on_next(token: TokenInterface):
7575

7676
# Run token manager
7777
await credential_provider.get_credentials_async()
78-
await asyncio.sleep(0.5)
78+
await asyncio.sleep(1)
7979

8080
assert len(tokens) > 0
8181

@@ -104,7 +104,7 @@ def on_error(error: Exception):
104104

105105
# Run token manager
106106
credential_provider.get_credentials()
107-
sleep(0.5)
107+
sleep(1)
108108

109109
assert len(errors) > 0
110110
assert str(errors[0]) == "Some exception"
@@ -135,7 +135,7 @@ async def on_error(error: Exception):
135135

136136
# Run token manager
137137
await credential_provider.get_credentials_async()
138-
await asyncio.sleep(0.5)
138+
await asyncio.sleep(1)
139139

140140
assert len(errors) > 0
141141
assert str(errors[0]) == "Some exception"

0 commit comments

Comments
 (0)