Skip to content

Commit de3d9c2

Browse files
Update poetry action; include dependency cache
1 parent a0212fb commit de3d9c2

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/integration-test.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,27 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
1615
- uses: actions/checkout@v4
17-
1816
- name: Set up Python 3.10
1917
uses: actions/setup-python@v5
2018
with:
2119
python-version: "3.10"
22-
2320
- name: Install Poetry
24-
uses: abatilo/actions-poetry@v3
21+
uses: abatilo/actions-poetry@v4
2522
with:
2623
poetry-version: "latest"
27-
24+
- name: Setup a local virtual environment
25+
run: |
26+
poetry config virtualenvs.create true --local
27+
poetry config virtualenvs.in-project true --local
28+
- uses: actions/cache@v3
29+
name: Define a cache for the virtual environment based on the dependencies lock file
30+
with:
31+
path: ./.venv
32+
key: venv-${{ hashFiles('poetry.lock') }}
2833
- name: Install dependencies
2934
run: |
3035
poetry install --extras "pandas munch tenacity"
31-
3236
- name: Integration test with pytest
3337
env:
3438
IG_SERVICE_USERNAME: ${{ secrets.IG_SERVICE_USERNAME }}
@@ -39,7 +43,6 @@ jobs:
3943
run: |
4044
poetry run coverage run -m --source=trading_ig pytest --log-cli-level=DEBUG --log-format="%(asctime)s %(levelname)s %(message)s" --log-date-format="%Y-%m-%d %H:%M:%S"
4145
poetry run coverage report
42-
4346
- name: Coveralls
4447
env:
4548
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)