Skip to content

Commit

Permalink
ci: test
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbaliasnikov committed Mar 1, 2024
1 parent a640ca9 commit 11103f6
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions .github/workflows/integration-tests-api.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Integration test - API

on: pull_request

jobs:
Expand All @@ -14,14 +15,14 @@ jobs:
node-version: ['lts/*'] # 18.17.1 or lts/*
test-pattern:
- accounts.test.ts
- addresses.test.ts
- batches.test.ts
- blocks.test.ts
- contracts.test.ts
- logs.test.ts
- stats.test.ts
- tokens.test.ts
- transactions.test.ts
# - addresses.test.ts
# - batches.test.ts
# - blocks.test.ts
# - contracts.test.ts
# - logs.test.ts
# - stats.test.ts
# - tokens.test.ts
# - transactions.test.ts
name: 'API test set: ${{ matrix.test-pattern}} / Node: ${{ matrix.node-version}}'
steps:
- name: Checkout with Submodule
Expand All @@ -35,26 +36,30 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: |
npm ci --no-audit
npx playwright install --with-deps chromium
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- run: docker-compose pull

- uses: satackey/[email protected]

- name: Start docker containers
run: |
docker-compose -f "docker-compose.yaml" up -d --build
- name: List running containers
run: docker ps
- name: API tests run (parallel)
working-directory: packages/integration-tests
run: |
npm ci --no-audit
npx playwright install --with-deps chromium
- name: API tests run (parallel)
working-directory: packages/integration-tests
run: |
cd packages/integration-tests
npx jest --verbose --testPathPattern=${{ matrix.test-pattern }}
npx jest
- name: Stop containers
if: always()
run: |
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 11103f6

Please sign in to comment.