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"]
@@ -160,7 +162,7 @@ jobs:
160162
161163 infrahub-testcontainers-check :
162164 if : needs.files-changed.outputs.infrahub_poetry_files == 'true'
163- needs : ["files-changed"]
165+ needs : ["prepare-environment", " files-changed"]
164166 runs-on : ubuntu-latest
165167 timeout-minutes : 5
166168 steps :
@@ -176,7 +178,7 @@ jobs:
176178
177179 - name : " Setup Python environment"
178180 run : |
179- pipx install poetry==1.8.5
181+ pipx install poetry==${{ needs.prepare-environment.outputs.POETRY_VERSION }}
180182 poetry config virtualenvs.create true --local
181183 poetry env use 3.12
182184
@@ -403,13 +405,14 @@ jobs:
403405 !contains(needs.*.result, 'cancelled') &&
404406 (needs.files-changed.outputs.backend == 'true' ||
405407 needs.files-changed.outputs.testcontainers == 'true')
406- needs : ["files-changed", "yaml-lint", "python-lint"]
408+ needs : ["prepare-environment", " files-changed", "yaml-lint", "python-lint"]
407409 runs-on :
408410 group : huge-runners
409411 timeout-minutes : 45
410412 env :
411413 INFRAHUB_DB_TYPE : neo4j
412414 PYTEST_XDIST_WORKER_COUNT : 1
415+ POETRY_VERSION : ${{ needs.prepare-environment.outputs.POETRY_VERSION }}
413416 steps :
414417 - name : " Check out repository code"
415418 uses : " actions/checkout@v4"
@@ -508,7 +511,7 @@ jobs:
508511 !contains(needs.*.result, 'cancelled') &&
509512 (needs.files-changed.outputs.backend == 'true' ||
510513 needs.files-changed.outputs.documentation == 'true')
511- needs : ["files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
514+ needs : ["prepare-environment", " files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
512515 runs-on : ubuntu-latest
513516 steps :
514517 - name : Check out repository code
@@ -521,7 +524,7 @@ jobs:
521524 python-version : 3.12
522525 - name : " Setup environment"
523526 run : |
524- pipx install poetry==1.8.5
527+ pipx install poetry==${{ needs.prepare-environment.outputs.POETRY_VERSION }}
525528 poetry config virtualenvs.create true --local
526529 poetry env use 3.12
527530 pip install invoke toml
@@ -624,7 +627,7 @@ jobs:
624627 !contains(needs.*.result, 'failure') &&
625628 !contains(needs.*.result, 'cancelled') &&
626629 (needs.files-changed.outputs.python == 'true') || (needs.files-changed.outputs.documentation == 'true')
627- needs : ["files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
630+ needs : ["prepare-environment", " files-changed", "yaml-lint", "python-lint", "infrahub-testcontainers-check"]
628631 runs-on : " ubuntu-22.04"
629632 timeout-minutes : 5
630633 steps :
@@ -638,7 +641,7 @@ jobs:
638641 python-version : " 3.12"
639642 - name : " Setup Python environment"
640643 run : |
641- pipx install poetry==1.8.5
644+ pipx install poetry==${{ needs.prepare-environment.outputs.POETRY_VERSION }}
642645 poetry config virtualenvs.create true --local
643646 poetry env use 3.12
644647 - name : " Install dependencies"
@@ -704,6 +707,7 @@ jobs:
704707 run :
705708 working-directory : ./frontend/app
706709 needs :
710+ - prepare-environment
707711 - javascript-lint
708712 - files-changed
709713 - yaml-lint
@@ -723,6 +727,7 @@ jobs:
723727 - name : E2E-testing-playwright
724728 env :
725729 INFRAHUB_DB_TYPE : neo4j
730+ POETRY_VERSION : ${{ needs.prepare-environment.outputs.POETRY_VERSION }}
726731 # - name: E2E-testing-playwright-nats
727732 # env:
728733 # INFRAHUB_DB_TYPE: neo4j
0 commit comments