-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: integration tests setup #177
base: main
Are you sure you want to change the base?
Changes from 250 commits
0015f13
491f99a
05ea503
5b8b417
f0420a9
e366f30
bc75ffc
93a290e
b1a3f01
4abbdeb
2c43123
bfd3e4c
c96bdb2
da270fc
c7d1ef9
89d813f
e874c63
d0953f1
f28a726
558794a
2f3cbd9
73510cd
432eb84
e82821c
48dc19e
d3c46e1
35dbdd9
73d6afa
3c10056
234994c
54094b0
3c9dd96
09103da
861c212
9f521a5
4c8422b
2d621d8
4c75f2e
c44a3c1
072a65c
5146686
d871f4e
174a99b
536a1e9
aa49486
aa3f20f
5888733
7e898a2
2453deb
22cb049
f08ad77
ad97b4a
84d5eb4
b990fa0
98235e8
d537d01
518a037
70b3ae5
2ef98d3
d89dac6
e8036ea
04cf38c
d458c83
29a195a
81be306
0fabc5e
e0c1469
8bae8a1
534abb9
3e707f8
fe83a3d
d4e2329
f8def1b
5b8527b
c50eb52
d942650
fcc1786
061b2a6
a092687
79f957c
3b15958
ad4a29c
6c2f3b4
7266856
5b7c757
eccc828
0f6d373
220f57c
3ba69b3
71aac3b
f083cab
d47f898
eba11e8
f494903
0e2e2e8
0c18932
c5320fc
0b4e29b
82341ce
6aafa19
bba6b6c
0259377
fde87c4
5a6fd69
dd7a456
8b68cd3
cdef776
0aeb85f
467a359
6ef25c7
1f5cfdd
2931487
072650f
1fb36ba
2b4e832
658105b
4f4787b
766bbbc
1f415fb
a4f04ee
022881a
c025fb1
2dc7bf7
c088201
2a4fb10
eadefc0
3bb8694
b314bcb
2a040b8
8386066
926e590
c549d97
e80043f
343cf89
d8d0a70
e3aa291
c054b5b
318c013
0281351
06bffb0
36675b0
4735b11
dd2c1b8
a640ca9
f6d9eed
f92572e
f3eb795
ba073cd
6d23d22
cdab5f2
018cc99
fe053dc
40775b2
dbf4411
382526d
c5a86cf
4c0040a
4babcac
f628183
6b9943a
dd3af36
87e3104
fae3657
2f2d13f
b31711c
410e491
99a8933
4790844
4ed7c4f
64cc6f2
e2445ba
7e43c46
d03fe86
7fa1b56
a433dc9
78a146c
1380443
d589cc0
aa893c0
0ccaf8f
9ff2fd0
ac55ca4
4c350d0
b0a38a0
a82496a
3aa7bd8
e4fb462
25109d6
572b272
18205f5
0fa8b72
64323ef
4e86100
5dc6df0
14cb26f
b2fd997
bd1e328
1688bf6
986d8af
a6bf6af
6732d6d
834384b
5467a5e
4e4f6db
9beae69
b182f33
f1f1487
d2c1356
5537474
4f548fc
808c10d
cc0f288
745ce83
1ce2430
f80e6e2
89b792b
d45f102
8a520a4
f4442b2
1fd5261
1c6e8ce
177bd6b
9ba81a6
6b780c9
f39e293
21fbfb5
6487ac6
196e204
98f183d
8c45c44
26cf37a
0977d95
06256a1
0cde2c2
7b006b5
e92f3b3
6595e5c
3103946
a3aa5c3
97590a2
93c8c6b
df1e10e
fa8b90c
5b47348
85e5adc
18c742b
33670f3
d0ead53
1f76848
3dd0c6c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
**/dist/ | ||
**.env | ||
**.env |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense to use the post-install-based approach. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
- 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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} | ||
"typescript.tsdk": "node_modules/typescript/lib", | ||
"editor.tabSize": 2 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,4 +120,4 @@ volumes: | |
geth: | ||
postgres: | ||
zksync-config: | ||
zksync-data: | ||
zksync-data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why --no-audit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed