-
Notifications
You must be signed in to change notification settings - Fork 114
61 lines (56 loc) · 1.68 KB
/
integration-tests-api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Integration test - API
on: pull_request
jobs:
runTests:
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:
# - 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
name: 'API test set: ${{ matrix.test-pattern}} / Node: ${{ matrix.node-version}}'
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