3030 METRICS_ENDPOINT : ${{ secrets.METRICS_ENDPOINT }}
3131
3232jobs :
33- # ------------------------------------------ Check Files Changes ------------------------------------------
33+ prepare-environment :
34+ uses : ./.github/workflows/define-versions.yml
35+ # ------------------------------------------ Check Files Changes ------------------------------------------
3436 files-changed :
3537 name : Detect which file has changed
3638 runs-on : ubuntu-latest
6163 token : ${{ github.token }}
6264 filters : .github/file-filters.yml
6365
64- # ------------------------------------------ All Linter ------------------------------------------
66+ # ------------------------------------------ All Linter ------------------------------------------
6567 yaml-lint :
6668 if : needs.files-changed.outputs.yaml == 'true'
6769 needs : ["files-changed"]
@@ -161,7 +163,7 @@ jobs:
161163
162164 infrahub-testcontainers-check :
163165 if : needs.files-changed.outputs.infrahub_poetry_files == 'true'
164- needs : ["files-changed"]
166+ needs : ["prepare-environment", " files-changed"]
165167 runs-on : ubuntu-latest
166168 timeout-minutes : 5
167169 steps :
@@ -177,7 +179,7 @@ jobs:
177179
178180 - name : " Setup Python environment"
179181 run : |
180- pipx install poetry==1.8.5
182+ pipx install poetry==${{ needs.prepare-environment.outputs.POETRY_VERSION }}
181183 poetry config virtualenvs.create true --local
182184 poetry env use 3.12
183185
@@ -404,13 +406,14 @@ jobs:
404406 !contains(needs.*.result, 'cancelled') &&
405407 (needs.files-changed.outputs.backend == 'true' ||
406408 needs.files-changed.outputs.testcontainers == 'true')
407- needs : ["files-changed", "yaml-lint", "python-lint"]
409+ needs : ["prepare-environment", " files-changed", "yaml-lint", "python-lint"]
408410 runs-on :
409411 group : huge-runners
410412 timeout-minutes : 45
411413 env :
412414 INFRAHUB_DB_TYPE : neo4j
413415 PYTEST_XDIST_WORKER_COUNT : 1
416+ POETRY_VERSION : ${{ needs.prepare-environment.outputs.POETRY_VERSION }}
414417 steps :
415418 - name : " Check out repository code"
416419 uses : " actions/checkout@v4"
@@ -509,7 +512,7 @@ jobs:
509512 !contains(needs.*.result, 'cancelled') &&
510513 (needs.files-changed.outputs.backend == 'true' ||
511514 needs.files-changed.outputs.documentation == 'true')
512- needs : ["files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
515+ needs : ["prepare-environment", " files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
513516 runs-on : ubuntu-latest
514517 steps :
515518 - name : Check out repository code
@@ -522,7 +525,7 @@ jobs:
522525 python-version : 3.12
523526 - name : " Setup environment"
524527 run : |
525- pipx install poetry==1.8.5
528+ pipx install poetry==${{ needs.prepare-environment.outputs.POETRY_VERSION }}
526529 poetry config virtualenvs.create true --local
527530 poetry env use 3.12
528531 pip install invoke toml
@@ -625,7 +628,7 @@ jobs:
625628 !contains(needs.*.result, 'failure') &&
626629 !contains(needs.*.result, 'cancelled') &&
627630 (needs.files-changed.outputs.python == 'true') || (needs.files-changed.outputs.documentation == 'true')
628- needs : ["files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
631+ needs : ["prepare-environment", " files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
629632 runs-on : " ubuntu-22.04"
630633 timeout-minutes : 5
631634 steps :
@@ -639,7 +642,7 @@ jobs:
639642 python-version : " 3.12"
640643 - name : " Setup Python environment"
641644 run : |
642- pipx install poetry==1.8.5
645+ pipx install poetry==${{ needs.prepare-environment.outputs.POETRY_VERSION }}
643646 poetry config virtualenvs.create true --local
644647 poetry env use 3.12
645648 - name : " Install dependencies"
@@ -705,6 +708,7 @@ jobs:
705708 run :
706709 working-directory : ./frontend/app
707710 needs :
711+ - prepare-environment
708712 - javascript-lint
709713 - files-changed
710714 - yaml-lint
@@ -724,6 +728,7 @@ jobs:
724728 - name : E2E-testing-playwright
725729 env :
726730 INFRAHUB_DB_TYPE : neo4j
731+ POETRY_VERSION : ${{ needs.prepare-environment.outputs.POETRY_VERSION }}
727732 # - name: E2E-testing-playwright-nats
728733 # env:
729734 # INFRAHUB_DB_TYPE: neo4j
0 commit comments