Skip to content

Commit

Permalink
Merge pull request #188 from lidofinance/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
infloop authored Nov 27, 2023
2 parents cf5f799 + 023fa72 commit b3155be
Show file tree
Hide file tree
Showing 255 changed files with 22,730 additions and 6,441 deletions.
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
/dist
/node_modules

# Env
.env

# Logs
logs
*.log
Expand Down
7 changes: 2 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,13 @@ module.exports = {
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
ignorePatterns: ['.eslintrc.js', 'chronix.config.ts', 'chronix-init.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/ci-dev-goerli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI Dev Goerli

on:
workflow_dispatch:
push:
branches:
- goerli
paths-ignore:
- ".github/**"

permissions: {}

jobs:
# test:
# ...

deploy:
runs-on: ubuntu-latest
# needs: test
name: Build and deploy
steps:
- name: Testnet deploy
uses: lidofinance/dispatch-workflow@v1
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
TARGET_REPO: "lidofinance/infra-mainnet"
TARGET_WORKFLOW: "deploy_testnet_lido_keys_api.yaml"
TARGET: "goerli"
4 changes: 2 additions & 2 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI Dev
name: CI Dev Holesky

on:
workflow_dispatch:
Expand All @@ -25,5 +25,5 @@ jobs:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
TARGET_REPO: "lidofinance/infra-mainnet"
TARGET_WORKFLOW: "deploy_testnet_lido_keys_api.yaml"
TARGET_WORKFLOW: "deploy_holesky_testnet_lido_keys_api.yaml"
TARGET: "develop"
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ on: pull_request
jobs:
test:
runs-on: ubuntu-latest

services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: node_operator_keys_service_db
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- name: Checkout repo
uses: actions/[email protected]
Expand All @@ -19,3 +35,15 @@ jobs:
run: yarn lint
- name: Run tests
run: yarn test
- name: Run E2E tests
run: yarn test:e2e:docker
env:
PROVIDERS_URLS: ${{ secrets.PROVIDERS_URLS }}
CL_API_URLS: "https://e2e-test.lido.fi,"
CHAIN_ID: ${{ secrets.CHAIN_ID }}
CHRONIX_PROVIDER_MAINNET_URL: ${{ secrets.CHRONIX_PROVIDER_MAINNET_URL }}
DB_NAME: node_operator_keys_service_db
DB_PORT: 5432
DB_HOST: localhost
DB_USER: postgres
DB_PASSWORD: postgres
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ lerna-debug.log*

# Tests
/.jest

# benchmarks
/benchmarks/output.json
55 changes: 55 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Nest Framework",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"start:debug",
],
"cwd": "${workspaceFolder}/src",
"autoAttachChildProcesses": true,
"restart": true,
"sourceMaps": true,
"stopOnEntry": false,
"console": "integratedTerminal",
},
{
"type": "node",
"request": "launch",
"name": "Debug Jest e2e",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"test:e2e:docker:debug",
],
"cwd": "${workspaceFolder}/src",
"autoAttachChildProcesses": true,
"restart": true,
"sourceMaps": true,
"stopOnEntry": false,
"console": "integratedTerminal",
},
{
"name": "Jest file",
"type": "node",
"request": "launch",
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--runInBand",
"--watch",
"--coverage=false",
"--no-cache"
],
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
}
}
]
}
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM node:18.14.2-alpine3.16 as building

RUN apk add --no-cache git=2.36.6-r0

WORKDIR /app

COPY package.json yarn.lock ./
Expand Down
15 changes: 15 additions & 0 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node:18.14.2-alpine3.16 as building

RUN apk add --no-cache git=2.36.6-r0

WORKDIR /app

COPY package.json yarn.lock chronix.config.ts .env ./
COPY jest* ./
COPY ./tsconfig*.json ./

RUN yarn install --frozen-lockfile --non-interactive && yarn cache clean
COPY ./src ./src
RUN yarn typechain

CMD ["yarn", "test:e2e:docker"]
Loading

0 comments on commit b3155be

Please sign in to comment.