-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
488 changed files
with
16,347 additions
and
11,564 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,7 +134,7 @@ jobs: | |
with: | ||
submodules: true | ||
- name: "Linting: markdownlint" | ||
uses: DavidAnson/markdownlint-cli2-action@v17 | ||
uses: DavidAnson/markdownlint-cli2-action@v18 | ||
with: | ||
config: .markdownlint.yaml | ||
globs: | | ||
|
@@ -312,8 +312,6 @@ jobs: | |
run: "poetry install --no-interaction --no-ansi" | ||
- name: "Mypy Tests" | ||
run: "poetry run invoke backend.mypy" | ||
- name: "Pylint Tests" | ||
run: "poetry run invoke backend.pylint" | ||
- name: "Integration Tests" | ||
run: "poetry run invoke backend.test-integration" | ||
- name: "Coveralls : Integration Tests" | ||
|
@@ -325,59 +323,106 @@ jobs: | |
flag-name: backend-integration | ||
parallel: true | ||
|
||
# --------------------------------------------------- | ||
# DISABLING Memgraph for now :( | ||
# - Tests where too flaky in 2.19 and completely broken in 2.20.1 | ||
# - Using new db session within tasks introduced flaky tests as well | ||
# --------------------------------------------------- | ||
# backend-tests-memgraph: | ||
# if: | | ||
# always() && !cancelled() && | ||
# !contains(needs.*.result, 'failure') && | ||
# !contains(needs.*.result, 'cancelled') && | ||
# needs.files-changed.outputs.backend == 'true' | ||
# needs: ["files-changed", "yaml-lint", "python-lint"] | ||
# runs-on: | ||
# group: huge-runners | ||
# timeout-minutes: 45 | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# include: | ||
# - name: backend-tests-unit-memgraph | ||
# env: | ||
# INFRAHUB_DB_TYPE: memgraph | ||
# # - name: backend-tests-unit-nats | ||
# # env: | ||
# # INFRAHUB_DB_TYPE: memgraph | ||
# # INFRAHUB_USE_NATS: 1 | ||
# # INFRAHUB_BROKER_DRIVER: nats | ||
# # INFRAHUB_CACHE_DRIVER: nats | ||
# name: ${{ matrix.name }} | ||
# env: ${{ matrix.env }} | ||
# steps: | ||
# - name: "Check out repository code" | ||
# uses: "actions/checkout@v4" | ||
# with: | ||
# submodules: true | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.12' | ||
# - name: "Setup git credentials" | ||
# run: "git config --global user.name 'Infrahub' && \ | ||
# git config --global user.email '[email protected]' && \ | ||
# 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: | | ||
# poetry config virtualenvs.create true --local | ||
# poetry env use 3.12 | ||
# - name: "Install dependencies" | ||
# run: "poetry install --no-interaction --no-ansi" | ||
# - name: "Unit Tests" | ||
# run: "poetry run invoke backend.test-unit" | ||
backend-tests-functional: | ||
if: | | ||
always() && !cancelled() && | ||
!contains(needs.*.result, 'failure') && | ||
!contains(needs.*.result, 'cancelled') && | ||
needs.files-changed.outputs.backend == 'true' | ||
needs: ["files-changed", "yaml-lint", "python-lint"] | ||
runs-on: | ||
group: "huge-runners" | ||
timeout-minutes: 30 | ||
env: | ||
INFRAHUB_DB_TYPE: neo4j | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v4" | ||
with: | ||
submodules: true | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
- name: "Setup git credentials" | ||
run: "git config --global user.name 'Infrahub' && \ | ||
git config --global user.email '[email protected]' && \ | ||
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: | | ||
poetry config virtualenvs.create true --local | ||
poetry env use 3.12 | ||
- name: "Install dependencies" | ||
run: "poetry install --no-interaction --no-ansi" | ||
- name: "Mypy Tests" | ||
run: "poetry run invoke backend.mypy" | ||
- name: "Pylint Tests" | ||
run: "poetry run invoke backend.pylint" | ||
- name: "Functional Tests" | ||
run: "poetry run invoke backend.test-functional" | ||
- name: "Coveralls : Functional Tests" | ||
uses: coverallsapp/github-action@v2 | ||
continue-on-error: true | ||
env: | ||
COVERALLS_SERVICE_NUMBER: ${{ github.sha }} | ||
with: | ||
flag-name: backend-functional | ||
parallel: true | ||
|
||
# --------------------------------------------------- | ||
# DISABLING Memgraph for now :( | ||
# Tests where too flaky in 2.19 and completely broken in 2.20.1 | ||
# --------------------------------------------------- | ||
# backend-tests-memgraph: | ||
# if: | | ||
# always() && !cancelled() && | ||
# !contains(needs.*.result, 'failure') && | ||
# !contains(needs.*.result, 'cancelled') && | ||
# needs.files-changed.outputs.backend == 'true' | ||
# needs: ["files-changed", "yaml-lint", "python-lint"] | ||
# runs-on: | ||
# group: huge-runners | ||
# timeout-minutes: 45 | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# include: | ||
# - name: backend-tests-unit-memgraph | ||
# env: | ||
# INFRAHUB_DB_TYPE: memgraph | ||
# # - name: backend-tests-unit-nats | ||
# # env: | ||
# # INFRAHUB_DB_TYPE: memgraph | ||
# # INFRAHUB_USE_NATS: 1 | ||
# # INFRAHUB_BROKER_DRIVER: nats | ||
# # INFRAHUB_CACHE_DRIVER: nats | ||
# name: ${{ matrix.name }} | ||
# env: ${{ matrix.env }} | ||
# steps: | ||
# - name: "Check out repository code" | ||
# uses: "actions/checkout@v4" | ||
# with: | ||
# submodules: true | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v5 | ||
# with: | ||
# python-version: '3.12' | ||
# - name: "Setup git credentials" | ||
# run: "git config --global user.name 'Infrahub' && \ | ||
# git config --global user.email '[email protected]' && \ | ||
# 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: | | ||
# poetry config virtualenvs.create true --local | ||
# poetry env use 3.12 | ||
# - name: "Install dependencies" | ||
# run: "poetry install --no-interaction --no-ansi" | ||
# - name: "Unit Tests" | ||
# run: "poetry run invoke backend.test-unit" | ||
|
||
backend-validate-generated: | ||
if: | | ||
|
@@ -506,12 +551,17 @@ jobs: | |
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: "Setup Python environment" | ||
run: | | ||
pipx install poetry | ||
poetry config virtualenvs.create true --local | ||
poetry env use 3.12 | ||
- name: "Install dependencies" | ||
run: "poetry install --no-interaction --no-ansi" | ||
- name: "Setup environment" | ||
run: "pip install invoke toml" | ||
- name: "Build Test Image" | ||
run: "invoke dev.build" | ||
- name: "Validate generated documentation" | ||
run: "invoke docs.validate --docker" | ||
run: "poetry run invoke docs.validate" | ||
|
||
validate-documentation-style: | ||
if: | | ||
|
@@ -657,9 +707,9 @@ jobs: | |
|
||
- name: Add response delay if required | ||
if: needs.files-changed.outputs.e2e_tests == 'true' | ||
run: echo "INFRAHUB_MISC_RESPONSE_DELAY=2" >> $GITHUB_ENV && invoke dev.start | ||
run: echo "INFRAHUB_MISC_RESPONSE_DELAY=1" >> $GITHUB_ENV && invoke dev.start | ||
env: | ||
INFRAHUB_MISC_RESPONSE_DELAY: 2 | ||
INFRAHUB_MISC_RESPONSE_DELAY: 1 | ||
|
||
- name: Set infrahub address | ||
if: needs.files-changed.outputs.e2e_tests == 'true' | ||
|
@@ -781,11 +831,11 @@ jobs: | |
|
||
- name: Display task worker 1 logs | ||
if: always() | ||
run: docker logs "${INFRAHUB_BUILD_NAME}-infrahub-git-1" | ||
run: docker logs "${INFRAHUB_BUILD_NAME}-task-worker-1" | ||
|
||
- name: Display task worker 2 logs | ||
if: always() | ||
run: docker logs "${INFRAHUB_BUILD_NAME}-infrahub-git-2" | ||
run: docker logs "${INFRAHUB_BUILD_NAME}-task-worker-2" | ||
|
||
- name: Display task manager logs | ||
if: always() | ||
|
Oops, something went wrong.