Skip to content

Commit 8768154

Browse files
committed
adding integration tests
1 parent e59a857 commit 8768154

File tree

6 files changed

+1303
-1261
lines changed

6 files changed

+1303
-1261
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,45 @@ jobs:
171171
codecov --flags python-filler-${{ matrix.python-version }}
172172
env:
173173
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
174+
175+
# ------------------------------------------ Integration Tests ------------------------------------------
176+
integration-tests:
177+
strategy:
178+
matrix:
179+
python-version:
180+
- "3.9"
181+
- "3.10"
182+
- "3.11"
183+
- "3.12"
184+
# Temporarily removed due to pendulum compatibility issues
185+
# - "3.13"
186+
if: |
187+
always() && !cancelled() &&
188+
!contains(needs.*.result, 'failure') &&
189+
!contains(needs.*.result, 'cancelled') &&
190+
needs.files-changed.outputs.python == 'true'
191+
needs: ["files-changed", "yaml-lint", "python-lint"]
192+
runs-on:
193+
group: "huge-runners"
194+
timeout-minutes: 30
195+
steps:
196+
- name: "Check out repository code"
197+
uses: "actions/checkout@v4"
198+
- name: Set up Python ${{ matrix.python-version }}
199+
uses: actions/setup-python@v5
200+
with:
201+
python-version: ${{ matrix.python-version }}
202+
- name: "Setup environment"
203+
run: |
204+
pipx install poetry
205+
poetry config virtualenvs.prefer-active-python true
206+
pip install invoke toml codecov
207+
- name: "Install Package"
208+
run: "poetry install --all-extras"
209+
- name: "Integration Tests"
210+
run: "poetry run pytest --cov infrahub_sdk tests/integration/"
211+
- name: "Upload coverage to Codecov"
212+
run: |
213+
codecov --flags integration-tests-${{ matrix.python-version }}
214+
env:
215+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)