From 26cdf48d947d7f09e5bc58e2d1ce41313e87b3cf Mon Sep 17 00:00:00 2001 From: Blair Currey <12960453+BlairCurrey@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:18:10 -0400 Subject: [PATCH] ci: add integration test to lint_test_build (#2569) * ci: WIP new integration test workflow no idea what the docker command will do... * fix: deps not found, add debug step * ci: add debug step * ci: use docker compose (v2) instead of docker-compose (v1) * chore: add setup from seed debug logs * ci: rework jobs into steps * chore: rm todo comment * chore: rm debug log * chore: shorten timeout in integration test * refactor: move integreation test job to lint_test_build * chore: test hostile cmd in ci, no setup host step * Revert "chore: test hostile cmd in ci, no setup host step" This reverts commit 5f529b2b9d8d1fa953b614dc6aa24ebda63bc445. --- .github/workflows/lint_test_build.yml | 22 ++++++++++++++++++++++ test/integration/package.json | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint_test_build.yml b/.github/workflows/lint_test_build.yml index f403533f27..9fe54b8cad 100644 --- a/.github/workflows/lint_test_build.yml +++ b/.github/workflows/lint_test_build.yml @@ -108,6 +108,27 @@ jobs: run: | npx @stoplight/spectral-cli lint ./packages/token-introspection/openapi/specs/token-introspection.yaml + integration-test: + runs-on: ubuntu-22.04 + needs: checkout + timeout-minutes: 5 + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup environment + uses: ./.github/workflows/rafiki/env-setup + + - name: Setup hosts + run: | + echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts + + - name: Build dependencies + run: pnpm --filter integration build:deps + + - name: Run tests + run: pnpm --filter integration run-tests + build: runs-on: ubuntu-22.04 timeout-minutes: 5 @@ -126,5 +147,6 @@ jobs: runs-on: ubuntu-22.04 needs: - build + - integration-test steps: - run: echo 'PR Checks Passed' diff --git a/test/integration/package.json b/test/integration/package.json index a06b8bb6a3..c9b8671819 100644 --- a/test/integration/package.json +++ b/test/integration/package.json @@ -4,7 +4,8 @@ "version": "1.0.0", "description": "", "scripts": { - "testenv:compose": "docker-compose -f ./testenv/cloud-nine-wallet/docker-compose.yml -f ./testenv/happy-life-bank/docker-compose.yml -f ./testenv/docker-compose.yml", + "build:deps": "pnpm --filter mock-account-service-lib build", + "testenv:compose": "docker compose -f ./testenv/cloud-nine-wallet/docker-compose.yml -f ./testenv/happy-life-bank/docker-compose.yml -f ./testenv/docker-compose.yml", "test": "jest", "run-tests": "./scripts/run-tests.sh" },