diff --git a/.github/workflows/cli.test.yaml b/.github/workflows/cli.test.yaml index 1b7e24648..3a51855fd 100644 --- a/.github/workflows/cli.test.yaml +++ b/.github/workflows/cli.test.yaml @@ -14,11 +14,11 @@ jobs: timeout-minutes: 3 services: - postgres: + postgres-api: image: postgres env: POSTGRES_PASSWORD: postgres - POSTGRES_DB: orakl-test + POSTGRES_DB: orakl-test-api options: >- --health-cmd pg_isready --health-interval 10s @@ -26,6 +26,19 @@ jobs: --health-retries 5 ports: - 5432:5432 + postgres-delegator: + image: postgres + env: + POSTGRES_PASSWORD: postgres + POSTGRES_DB: orakl-test-delegator + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 5433:5432 + steps: - uses: actions/checkout@v3 @@ -36,18 +49,20 @@ jobs: run: yarn install - name: Run api run: | + yarn api build yarn api prisma-migrate dev --name init yarn api start & env: - DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl-test?schema=orakl" + DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl-test-api?schema=public" ENCRYPT_PASSWORD: "abc123" APP_PORT: "3000" - name: Run delegator run: | + yarn delegator build yarn delegator prisma-migrate dev --name init yarn delegator start & env: - DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl-test?schema=delegator" + DATABASE_URL: "postgresql://postgres:postgres@localhost:5433/orakl-test-delegator?schema=public" PROVIDER_URL: "https://api.baobab.klaytn.net:8651" APP_PORT: "3002" DELEGATOR_FEEPAYER_PK: ${{ secrets.DELEGATOR_FEEPAYER_PK}} diff --git a/cli/test/delegator.ts b/cli/test/delegator.ts index e67b5cb8d..913793e70 100644 --- a/cli/test/delegator.ts +++ b/cli/test/delegator.ts @@ -32,7 +32,7 @@ const contractAddress = '0x93120927379723583c7a0dd2236fcb255e96949f' const functionName = 'increment()' describe('CLI Aggregator', function () { - test('Test Organization', async function () { + test('Test Aggregator', async function () { // Insert Organization const organization = await organizationInsertHandler()({ name: organizationName }) expect(organization.name).toBe(organizationName)