@@ -126,7 +126,6 @@ jobs:
126126 - " 3.10"
127127 - " 3.11"
128128 - " 3.12"
129- - " 3.13"
130129 if : |
131130 always() && !cancelled() &&
132131 !contains(needs.*.result, 'failure') &&
@@ -144,7 +143,7 @@ jobs:
144143 python-version : ${{ matrix.python-version }}
145144 - name : " Setup environment"
146145 run : |
147- pipx install poetry==1.8.5
146+ pipx install poetry==1.8.5 --python python${{ matrix.python-version }}
148147 poetry config virtualenvs.create true --local
149148 pip install invoke toml codecov
150149 - name : " Install Package"
@@ -174,7 +173,7 @@ jobs:
174173 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
175174
176175 # ------------------------------------------ Integration Tests ------------------------------------------
177- integration-tests :
176+ integration-tests-latest-infrahub :
178177 if : |
179178 always() && !cancelled() &&
180179 !contains(needs.*.result, 'failure') &&
@@ -202,10 +201,91 @@ jobs:
202201 pip install invoke toml codecov
203202 - name : " Install Package"
204203 run : " poetry install --all-extras"
204+ - name : " Set environment variables for python_testcontainers"
205+ run : |
206+ echo INFRAHUB_TESTING_IMAGE_VER=latest >> $GITHUB_ENV
205207 - name : " Integration Tests"
206- run : " poetry run pytest --cov infrahub_sdk tests/integration/"
208+ run : |
209+ poetry run pytest --cov infrahub_sdk tests/integration/
207210 - name : " Upload coverage to Codecov"
208211 run : |
209212 codecov --flags integration-tests
210213 env :
211214 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
215+
216+ # NOTE: Disabling this test for now because it's expected that we can't start the latest version of infrahub
217+ # with the current shipping version of infrahub-testcontainers
218+ # integration-tests-local-infrahub:
219+ # if: |
220+ # always() && !cancelled() &&
221+ # !contains(needs.*.result, 'failure') &&
222+ # !contains(needs.*.result, 'cancelled') &&
223+ # needs.files-changed.outputs.python == 'true' &&
224+ # (github.base_ref == 'stable' || github.base_ref == 'develop')
225+ # needs: ["files-changed", "yaml-lint", "python-lint"]
226+ # runs-on:
227+ # group: "huge-runners"
228+ # timeout-minutes: 30
229+ # steps:
230+ # - name: "Check out repository code"
231+ # uses: "actions/checkout@v4"
232+
233+ # - name: "Extract target branch name"
234+ # id: extract_branch
235+ # run: echo "TARGET_BRANCH=${{ github.base_ref }}" >> $GITHUB_ENV
236+
237+ # - name: "Checkout infrahub repository"
238+ # uses: "actions/checkout@v4"
239+ # with:
240+ # repository: "opsmill/infrahub"
241+ # path: "infrahub-server"
242+ # ref: ${{ github.base_ref }}
243+ # submodules: true
244+
245+ # - name: Set up Python
246+ # uses: actions/setup-python@v5
247+ # with:
248+ # python-version: "3.12"
249+
250+ # - name: "Setup git credentials prior dev.build"
251+ # run: |
252+ # cd infrahub-server
253+ # git config --global user.name 'Infrahub'
254+ # git config --global user.email '[email protected] ' 255+ # git config --global --add safe.directory '*'
256+ # git config --global credential.usehttppath true
257+ # git config --global credential.helper /usr/local/bin/infrahub-git-credential
258+
259+ # - name: "Set environment variables prior dev.build"
260+ # run: |
261+ # echo "INFRAHUB_BUILD_NAME=infrahub-${{ runner.name }}" >> $GITHUB_ENV
262+ # RUNNER_NAME=$(echo "${{ runner.name }}" | grep -o 'ghrunner[0-9]\+' | sed 's/ghrunner\([0-9]\+\)/ghrunner_\1/')
263+ # echo "PYTEST_DEBUG_TEMPROOT=/var/lib/github/${RUNNER_NAME}/_temp" >> $GITHUB_ENV
264+ # echo "INFRAHUB_IMAGE_VER=local-${{ runner.name }}-${{ github.sha }}" >> $GITHUB_ENV
265+ # echo "INFRAHUB_TESTING_IMAGE_VER=local-${{ runner.name }}-${{ github.sha }}" >> $GITHUB_ENV
266+ # echo "INFRAHUB_TESTING_DOCKER_IMAGE=opsmill/infrahub" >> $GITHUB_ENV
267+
268+ # - name: "Build container"
269+ # run: |
270+ # cd infrahub-server
271+ # inv dev.build
272+
273+ # - name: "Setup environment"
274+ # run: |
275+ # pipx install poetry==1.8.5
276+ # poetry config virtualenvs.create true --local
277+ # pip install invoke toml codecov
278+
279+ # - name: "Install Package"
280+ # run: "poetry install --all-extras"
281+
282+ # - name: "Integration Tests"
283+ # run: |
284+ # echo "Running tests for version: $INFRAHUB_TESTING_IMAGE_VER"
285+ # poetry run pytest --cov infrahub_sdk tests/integration/
286+
287+ # - name: "Upload coverage to Codecov"
288+ # run: |
289+ # codecov --flags integration-tests
290+ # env:
291+ # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
0 commit comments