Skip to content
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

Fix etherscan instances test after server modularity refactoring #1667

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,15 @@ jobs:
- run:
name: install dependencies
command: npm install
- run:
name: build
command: npx lerna run build
- run:
name: lint
command: npm run lerna-lint
- run:
name: tsc and test
command: npx lerna run build && npx lerna run lerna-test
name: test
command: npx lerna run lerna-test
environment:
DOCKER_HOST_POSTGRES_TEST_PORT: 5432
SOURCIFY_POSTGRES_HOST: "localhost"
Expand Down
7 changes: 5 additions & 2 deletions .circleci/new_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ jobs:
- run:
name: install dependencies
command: npm install
- run:
name: build
command: npx lerna run build
- run:
name: lint
command: npm run lerna-lint
- run:
name: tsc and test
command: npx lerna run build && npx lerna run lerna-test
name: test
command: npx lerna run lerna-test
environment:
DOCKER_HOST_POSTGRES_TEST_PORT: 5432
SOURCIFY_POSTGRES_HOST: "localhost"
Expand Down
1 change: 1 addition & 0 deletions services/monitor/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
1 change: 1 addition & 0 deletions services/server/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/
1 change: 1 addition & 0 deletions services/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"check": "run-s check:*",
"check:eslint": "eslint . --ext .ts",
"check:prettier": "prettier \"./**/*.ts\" --check",
"check:tsc": "tsc --noEmit -p ./tsconfig.lint.json",
"cov": "run-s -c build test-local cov:html cov:lcov && open-cli coverage/index.html",
"cov:html": "c8 report --reporter=html",
"cov:lcov": "c8 report --reporter=lcov",
Expand Down
8 changes: 4 additions & 4 deletions services/server/test/chains/etherscan-instances.spec.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
// Periodical tests of Import from Etherscan for each instance e.g. Arbiscan, Etherscan, Bscscan, etc.

import testContracts from "../helpers/etherscanInstanceContracts.json";
import {
sourcifyChainsMap,
sourcifyChainsArray,
} from "../../src/sourcify-chains";
import { sourcifyChainsMap } from "../../src/sourcify-chains";
import { verifyAndAssertEtherscan } from "../helpers/helpers";
import chai from "chai";
import { ServerFixture } from "../helpers/ServerFixture";
import { ChainRepository } from "../../src/sourcify-chain-repository";

const CUSTOM_PORT = 5679;

describe("Test each Etherscan instance", function () {
const serverFixture = new ServerFixture({
port: CUSTOM_PORT,
});
const sourcifyChainsArray = new ChainRepository(sourcifyChainsMap)
.sourcifyChainsArray;

const testedChains: number[] = [];
let chainId: keyof typeof testContracts;
Expand Down
7 changes: 7 additions & 0 deletions services/server/tsconfig.lint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"rootDir": ".",
},
"include": ["src/**/*.ts", "src/**/*.js", "test/**/*.ts", "test/**/*.js"],
}