Skip to content

Commit 969b0e6

Browse files
committed
fix(ci): retry test/deploy
1 parent 3d1a060 commit 969b0e6

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

.github/workflows/deploy_lambda.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,11 @@ jobs:
2626
- uses: actions/checkout@v4
2727

2828
- uses: actions/setup-python@v5
29-
- run: pip install pytest
29+
- run: |
30+
pip install poetry
31+
poetry install --no-interaction
3032
- name: Run tests
31-
run: python -m pytest
32-
33-
- name: Install and configure Poetry
34-
uses: snok/install-poetry@v1
35-
with:
36-
version: 1.7.1
37-
virtualenvs-create: true
38-
39-
- name: Load cached dependencies
40-
id: cached-poetry-dependencies
41-
uses: actions/cache@v3
42-
with:
43-
path: .venv
44-
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
45-
46-
- name: Install dependencies
47-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
48-
run: poetry install --no-interaction
33+
run: poetry run pytest
4934

5035
- uses: aws-actions/configure-aws-credentials@v4
5136
with:

.github/workflows/test.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-python@v5
21-
- run: pip install pytest
21+
- run: |
22+
pip install poetry
23+
poetry install --no-interaction
2224
- name: Run tests
23-
run: python -m pytest
25+
run: poetry run pytest

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.1.0"
44
description = ""
55
authors = ["Your Name <you@example.com>"]
66
readme = "README.md"
7+
package-mode = false
78

89
[tool.poetry.dependencies]
910
python = "^3.12"
@@ -28,3 +29,8 @@ black = "^24.10.0"
2829
[build-system]
2930
requires = ["poetry-core"]
3031
build-backend = "poetry.core.masonry.api"
32+
33+
[tool.pytest.ini_options]
34+
pythonpath = "."
35+
addopts = "--import-mode=importlib"
36+
asyncio_default_fixture_loop_scope = "function"

0 commit comments

Comments
 (0)