-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from matter-labs/QA-414-ci-run-on-fixed-branch
test: prepare run api tests on ci
- Loading branch information
Showing
7 changed files
with
71 additions
and
7 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Integration test - API | ||
on: pull_request | ||
|
||
jobs: | ||
runTests: | ||
name: Run API integration tests | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
checks: write | ||
strategy: | ||
matrix: | ||
node-version: ['lts/*'] # 18.17.1 or lts/* | ||
test-pattern: | ||
- addresses.test.ts | ||
- batches.test.ts | ||
- blocks.test.ts | ||
- contracts.test.ts | ||
- logs.test.ts | ||
- stats.test.ts | ||
- tokens.test.ts | ||
- transactions.test.ts | ||
steps: | ||
- name: Checkout with Submodule | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
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 }} | ||
|
||
- 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) | ||
run: | | ||
cd packages/integration-tests | ||
npx jest --verbose --testPathPattern=${{ matrix.test-pattern }} | ||
- name: Stop containers | ||
if: always() | ||
run: | | ||
docker-compose -f "docker-compose.yaml" down |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
name: block-explorer | ||
version: '3.8' | ||
|
||
services: | ||
app: | ||
build: | ||
|
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
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
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
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
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