Skip to content

Commit e593056

Browse files
committed
ci: Upgrade integration tests to use same Python version handling as normal checks
1 parent 1bd6feb commit e593056

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/checks.yml

+8-7
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ jobs:
7777
integration:
7878
name: Integration Tests
7979
runs-on: ubuntu-latest
80-
env:
81-
PYTHON_VERSION: 3.10
8280
services:
8381
openapi-test-server:
8482
image: ghcr.io/openapi-generators/openapi-test-server:latest
@@ -89,14 +87,17 @@ jobs:
8987
- name: Set up Python
9088
uses: actions/setup-python@v2
9189
with:
92-
python-version: ${{ env.PYTHON_VERSION }}
90+
python-version: "3.10"
91+
- name: Get Python Version
92+
id: get_python_version
93+
run: echo "::set-output name=python_version::$(python --version)"
9394
- name: Cache dependencies
9495
uses: actions/cache@v2
9596
with:
9697
path: .venv
97-
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-dependencies-${{ hashFiles('**/poetry.lock') }}
98+
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies-${{ hashFiles('**/poetry.lock') }}
9899
restore-keys: |
99-
${{ runner.os }}-${{ env.PYTHON_VERSION }}-dependencies
100+
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies
100101
- name: Install dependencies
101102
run: |
102103
pip install poetry
@@ -114,9 +115,9 @@ jobs:
114115
uses: actions/cache@v2
115116
with:
116117
path: integration_tests/openapi-test-server-client/.venv
117-
key: ${{ runner.os }}-${{ env.PYTHON_VERSION }}-integration-dependencies-${{ hashFiles('**/poetry.lock') }}
118+
key: ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies-${{ hashFiles('**/poetry.lock') }}
118119
restore-keys: |
119-
${{ runner.os }}-${{ env.PYTHON_VERSION }}-integration-dependencies
120+
${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-integration-dependencies
120121
- name: Install Integration Dependencies
121122
run: |
122123
cd integration_tests/openapi-test-server-client

0 commit comments

Comments
 (0)