Use TestContainer fixtures #9417
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 Python environment" | |
run: "pip install toml invoke" | |
- name: "Set environment variables" | |
run: echo INFRAHUB_BUILD_NAME=infrahub-${{ runner.name }} >> $GITHUB_ENV | |
- name: "Set environment variables" | |
run: echo INFRAHUB_IMAGE_VER=local-${{ runner.name }}-${{ github.sha }} >> $GITHUB_ENV | |
- name: "Clear docker environment" | |
run: docker compose -p $INFRAHUB_BUILD_NAME down -v --remove-orphans --rmi local | |
- name: "Build Test Image" | |
run: "invoke dev.build" | |
- name: "Pull External Docker Images" | |
run: "invoke dev.pull" | |
- name: "ls -l /var/run/docker.sock on host machine" | |
run: "ls -l /var/run/docker.sock" | |
- 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 |