Skip to content

Commit 1985aff

Browse files
committed
chore: add pipeline test invoke demo
1 parent 94b35cd commit 1985aff

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,78 @@ jobs:
724724
if: always()
725725
run: 'echo "https://grafana-prod.tailc018d.ts.net/d/a4461039-bb27-4f57-9b2a-2c7f4e0a3459/e2e-tests?orgId=1&var-pr=$GITHUB_PR_NUMBER&var-job=$JOB_NAME&var-runner=$INFRAHUB_BUILD_NAME&from=$TEST_START_TIME&to=$(date +%s)000"'
726726

727+
# ------------------------------------------ E2E invoke demo ------------------------------------------------
728+
E2E-testing-invoke-demo-start:
729+
needs:
730+
- javascript-lint
731+
- files-changed
732+
- yaml-lint
733+
- python-lint
734+
if: |
735+
always() && !cancelled() &&
736+
!contains(needs.*.result, 'failure') &&
737+
!contains(needs.*.result, 'cancelled')
738+
runs-on:
739+
group: huge-runners
740+
steps:
741+
- name: Check out repository code
742+
uses: actions/checkout@v4
743+
with:
744+
submodules: true
745+
746+
- name: Set up Python
747+
uses: actions/setup-python@v5
748+
with:
749+
python-version: "3.12"
750+
751+
- name: Install Invoke
752+
run: |
753+
pip install toml invoke
754+
755+
- name: Set job name
756+
run: echo JOB_NAME="$GITHUB_JOB" >> $GITHUB_ENV
757+
758+
- name: "Set environment variables"
759+
run: echo INFRAHUB_BUILD_NAME=infrahub-${{ runner.name }} >> $GITHUB_ENV
760+
- name: "Clear docker environment"
761+
run: docker compose -p $INFRAHUB_BUILD_NAME down -v --remove-orphans --rmi local
762+
763+
- name: "Store start time"
764+
run: echo TEST_START_TIME=$(date +%s)000 >> $GITHUB_ENV
765+
766+
- name: Run 'invoke demo'
767+
run: |
768+
unset INFRAHUB_IMAGE_VER
769+
invoke demo.start demo.load-infra-schema demo.load-infra-data
770+
771+
- name: Display server logs
772+
if: always()
773+
run: docker logs "${INFRAHUB_BUILD_NAME}-server-1"
774+
775+
- name: Display task worker 1 logs
776+
if: always()
777+
run: docker logs "${INFRAHUB_BUILD_NAME}-infrahub-git-1"
778+
779+
- name: Display task worker 2 logs
780+
if: always()
781+
run: docker logs "${INFRAHUB_BUILD_NAME}-infrahub-git-2"
782+
783+
- name: Display task manager logs
784+
if: always()
785+
run: docker logs "${INFRAHUB_BUILD_NAME}-task-manager-1"
786+
787+
- name: Display database logs
788+
if: always()
789+
run: docker logs "${INFRAHUB_BUILD_NAME}-database-1"
790+
791+
- name: Display message-queue logs
792+
if: always()
793+
run: docker logs "${INFRAHUB_BUILD_NAME}-message-queue-1"
794+
795+
- name: "Clear docker environment and force vmagent to stop"
796+
if: always()
797+
run: docker compose -p $INFRAHUB_BUILD_NAME down -v --remove-orphans --rmi local
798+
727799
# ------------------------------------------ Benchmarks ------------------------------------------------
728800
backend-benchmark:
729801
needs:

0 commit comments

Comments
 (0)