Skip to content

Commit 876ea82

Browse files
authored
feature/migrate-integration-tests (#44)
1 parent 4e4b436 commit 876ea82

File tree

6 files changed

+19
-50
lines changed

6 files changed

+19
-50
lines changed

.github/workflows/main.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
build-subgraph:
18+
build-and-test:
1919
runs-on: ubuntu-latest
20-
20+
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v4
@@ -28,7 +28,7 @@ jobs:
2828
node-version: 20
2929
cache: 'npm'
3030

31-
- name: Init
31+
- name: Install dependencies
3232
run: npm ci
3333

3434
- name: Check Format
@@ -40,3 +40,8 @@ jobs:
4040
- name: Run unit tests
4141
run: npm run test:unit
4242

43+
- name: Prepare test stack
44+
run: npm run start-test-stack
45+
46+
- name: Run integration tests
47+
run: npm run test:e2e

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
## vNEXT
44

5-
- Remove unused files (#42)
5+
- Migrate integration tests from Jenkins to GitHub Actions. (#44)
6+
- Remove unused files to streamline the repository. (#42)
67
- Rewrite Jenkins CI for future migration (#36, #37)
78
- Add a modern test stack, agnostic to the forked network. (#38)
89
- Add a section in the README to explain how to use the Docker-based subgraph deployer. (#38)

Jenkinsfile-itest

Lines changed: 0 additions & 31 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ install project deps
3030
npm ci
3131
```
3232

33-
generate code
34-
35-
```sh
36-
npm run codegen
37-
```
38-
3933
build the project and generate the necessary files:
4034

4135
```sh

test-stack/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ services:
3737

3838
ipfs:
3939
restart: unless-stopped
40-
image: ipfs/go-ipfs:v0.34.1
40+
image: ipfs/kubo:v0.34.1
4141
expose:
4242
- 8080
4343
- 5001

test-stack/prepare-test-env.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ async function createEnvFiles(forkBlockNumber: number) {
3535
console.log('Creating .env file for docker-compose test-stack');
3636
writeFileSync(
3737
'.env',
38-
`############ THIS FILE IS GENERATED ############
39-
# run "node prepare-test-env.js" to regenerate #
40-
################################################
41-
42-
# blockchain node to use as the reference for the local fork
43-
FORK_URL=${forkUrl}
44-
# block number to fork from
45-
FORK_BLOCK=${forkBlockNumber}`,
38+
'############ THIS FILE IS GENERATED ############\n' +
39+
'# run "node prepare-test-env.js" to regenerate #\n' +
40+
'################################################\n' +
41+
'\n' +
42+
'# blockchain node to use as the reference for the local fork\n' +
43+
`FORK_URL=${forkUrl}\n` +
44+
'# block number to fork from\n' +
45+
`FORK_BLOCK=${forkBlockNumber}\n`,
4646
);
4747
}
4848

0 commit comments

Comments
 (0)