Skip to content

Commit 5011dbf

Browse files
authored
Merge pull request #196 from opsmill/jbr-add-test-integration-github
adding integration tests
2 parents e59a857 + d7d4609 commit 5011dbf

File tree

6 files changed

+1294
-1261
lines changed

6 files changed

+1294
-1261
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,36 @@ 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+
if: |
178+
always() && !cancelled() &&
179+
!contains(needs.*.result, 'failure') &&
180+
!contains(needs.*.result, 'cancelled') &&
181+
needs.files-changed.outputs.python == 'true'
182+
needs: ["files-changed", "yaml-lint", "python-lint"]
183+
runs-on:
184+
group: "huge-runners"
185+
timeout-minutes: 30
186+
steps:
187+
- name: "Check out repository code"
188+
uses: "actions/checkout@v4"
189+
- name: Set up Python
190+
uses: actions/setup-python@v5
191+
with:
192+
python-version: "3.12"
193+
- name: "Setup environment"
194+
run: |
195+
pipx install poetry
196+
poetry config virtualenvs.prefer-active-python true
197+
pip install invoke toml codecov
198+
- name: "Install Package"
199+
run: "poetry install --all-extras"
200+
- name: "Integration Tests"
201+
run: "poetry run pytest --cov infrahub_sdk tests/integration/"
202+
- name: "Upload coverage to Codecov"
203+
run: |
204+
codecov --flags integration-tests
205+
env:
206+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)