Use TestContainer fixtures #9443
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# yamllint disable rule:truthy rule:truthy rule:line-length | |
name: "CI" | |
on: | |
pull_request: | |
push: | |
branches: | |
- develop | |
- stable | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
INFRAHUB_DB_USERNAME: neo4j | |
INFRAHUB_DB_PASSWORD: admin | |
INFRAHUB_DB_ADDRESS: localhost | |
INFRAHUB_DB_PORT: 7687 | |
INFRAHUB_DB_PROTOCOL: bolt | |
INFRAHUB_BROKER_ADDRESS: message-queue | |
INFRAHUB_LOG_LEVEL: CRITICAL | |
INFRAHUB_IMAGE_NAME: "opsmill/infrahub" | |
INFRAHUB_IMAGE_VER: "local" | |
PYTEST_XDIST_WORKER_COUNT: 4 | |
INFRAHUB_TEST_IN_DOCKER: 1 | |
VALE_VERSION: "3.7.1" | |
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }} | |
METRICS_ENDPOINT: ${{ secrets.METRICS_ENDPOINT }} | |
jobs: | |
backend-tests-integration: | |
runs-on: | |
group: "huge-runners" | |
timeout-minutes: 30 | |
env: | |
INFRAHUB_DB_TYPE: neo4j | |
steps: | |
- name: "Check out repository code" | |
uses: "actions/checkout@v4" | |
- name: "Setup git credentials" | |
run: "git config --global user.name 'Infrahub' && \ | |
git config --global user.email 'infrahub@opsmill.com' && \ | |
git config --global --add safe.directory '*' && \ | |
git config --global credential.usehttppath true && \ | |
git config --global credential.helper /usr/local/bin/infrahub-git-credential" | |
- name: "Setup Python environment" | |
run: "pip install toml invoke" | |
- name: "Install dependencies" | |
run: "poetry install --no-interaction --no-ansi" | |
- name: "Integration Tests" | |
run: "invoke backend.test-integration" | |
- name: "Coveralls : Integration Tests" | |
uses: coverallsapp/github-action@v2 | |
continue-on-error: true | |
env: | |
COVERALLS_SERVICE_NUMBER: ${{ github.sha }} | |
with: | |
flag-name: backend-integration | |
parallel: true |