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

Update node version to lts #2655

Merged
merged 1 commit into from
Feb 5, 2025
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
38 changes: 18 additions & 20 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,43 @@ on:
workflow_dispatch:
inputs:
cpus:
description: 'docker cpus '
description: "docker cpus "
default: 2
require: true
memory:
description: 'docker memory'
default: '4g'
description: "docker memory"
default: "4g"
require: true
benchmark-time:
description: 'Benchmark time(h/m/s)'
description: "Benchmark time(h/m/s)"
default: 30m
require: true
indexerVersion:
description: 'indexer version'
default: 'latest'
description: "indexer version"
default: "latest"
require: true
deployment:
description: 'Deployment'
default: 'QmakYyTWzTxaDU842CczyDWV51Ay9E55k7kbRRXTB3f395'
description: "Deployment"
default: "QmakYyTWzTxaDU842CczyDWV51Ay9E55k7kbRRXTB3f395"
require: false
network-endpoint:
description: 'Network endpoint'
default: 'wss://rpc-polkadot.luckyfriday.io'
description: "Network endpoint"
default: "wss://rpc-polkadot.luckyfriday.io"
require: true
disableHistorical:
description: 'Disable historical'
default: 'true'
description: "Disable historical"
default: "true"
require: false
batch-size:
description: 'batch-size'
description: "batch-size"
default: 30
require: false
workers:
description: 'workers'
description: "workers"
default: 4
require: false
others:
description: 'Other flags'
description: "Other flags"
require: false

jobs:
Expand All @@ -48,7 +48,7 @@ jobs:
# Containers must run in Linux based operating systems
runs-on: ubuntu-latest
# Docker Hub image that `container-job` executes in
container: node:18
container: node:lts
services:
# Label used to access the service container
postgres:
Expand All @@ -73,7 +73,7 @@ jobs:
- name: Install Docker inside the container
run: |
apt-get update
apt-get install -y docker.io
apt-get install -y docker.io

- name: Install PostgreSQL client
run: |
Expand Down Expand Up @@ -161,15 +161,14 @@ jobs:
name: benchmark-${{steps.current-time.outputs.formattedTime}}-${{steps.query_meta.outputs.indexer_version}}
path: output/benchmark/


- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
# channel for sq-benchmark
channel-id: 'C05JF51F1MJ'
channel-id: "C05JF51F1MJ"
# For posting a rich message using Block Kit
payload: |
{
Expand All @@ -186,4 +185,3 @@ jobs:
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/discord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: rjstone/discord-webhook-notify@v1
with:
webhookUrl: ${{ secrets.DISCORD_RELEASE_NOTES_WEBHOOK }}
color: '#6499ff'
color: "#6499ff"
avatarUrl: https://github.githubassets.com/images/modules/logos_page/Octocat.png
details: ${{ github.event.release.body }}
description: "[Release] ${{ github.event.release.name }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
node-version: lts/*

- run: yarn install

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/node-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
workflow_dispatch:
inputs:
isLatest:
description: 'Add latest tag'
default: 'true'
description: "Add latest tag"
default: "true"
required: true

jobs:
Expand Down Expand Up @@ -36,7 +36,6 @@ jobs:
echo "changes_found=true" >> "$GITHUB_OUTPUT"
fi


node-build-push-docker-onfinality:
needs: check
if: needs.check.outputs.changes_found == 'true'
Expand Down
78 changes: 39 additions & 39 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ name: PR
on:
pull_request:
paths-ignore:
- '.github/workflows/**'
- ".github/workflows/**"
jobs:
code-style:
name: code-style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn
- name: build
run: yarn build
- name: code-style check
run: yarn pretty-quick --check --pattern 'packages/*/src/**/*' --branch origin/main
- name: lint
run: yarn lint
- uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: lts/*
- run: yarn
- name: build
run: yarn build
- name: code-style check
run: yarn pretty-quick --check --pattern 'packages/*/src/**/*' --branch origin/main
- name: lint
run: yarn lint

coverage:
name: Coverage report
Expand All @@ -46,35 +46,35 @@ jobs:
SUBQL_ACCESS_TOKEN_TEST: ${{ secrets.SUBQL_ACCESS_TOKEN_TEST }}
SUBQL_ORG_TEST: ${{ secrets.SUBQL_ORG_TEST }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Enable btree btree_gist
run: psql "postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_DATABASE" -c "CREATE EXTENSION IF NOT EXISTS btree_gist;"
- name: Enable btree btree_gist
run: psql "postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_DATABASE" -c "CREATE EXTENSION IF NOT EXISTS btree_gist;"

- name: Use Node 18
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: lts/*

- name: install dependencies
run: yarn
- name: install dependencies
run: yarn

- name: build
run: yarn build
- name: build
run: yarn build

- uses: artiomtr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
skip-step: install
package-manager: yarn
working-directory: .
test-script: yarn test:ci
annotations: none
# coverage-file: report.json
base-coverage-file: report-main.json
- uses: artiomtr/jest-coverage-report-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
skip-step: install
package-manager: yarn
working-directory: .
test-script: yarn test:ci
annotations: none
# coverage-file: report.json
base-coverage-file: report-main.json

- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: report.json
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: report.json
6 changes: 3 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
paths-ignore:
- '.github/workflows/**'
- ".github/workflows/**"

concurrency:
group: publish
Expand All @@ -24,7 +24,7 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
node-version: lts/*

- uses: marceloprado/has-changed-path@v1
id: changed-utils
Expand Down Expand Up @@ -155,6 +155,6 @@ jobs:
- name: Commit changes
uses: EndBug/add-and-commit@v5
with:
message: '[SKIP CI] Prerelease'
message: "[SKIP CI] Prerelease"
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
branches:
- main
paths-ignore:
- '.github/workflows/**'
- ".github/workflows/**"
workflow_dispatch:

concurrency:
Expand All @@ -13,7 +13,6 @@ concurrency:
cancel-in-progress: false

jobs:

# This gets the commit message because workflow dispatch doesnt set: github.event.head_commit.message
pre-ci:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -54,9 +53,9 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
node-version: lts/*

#Identify changes
#Identify changes

- uses: marceloprado/has-changed-path@v1
id: changed-utils
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/benchmark/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18
FROM node:lts

# Define build-time arguments

Expand Down
2 changes: 1 addition & 1 deletion deploy/k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
initContainers:
- name: prepare
imagePullPolicy: IfNotPresent
image: node:18-alpine
image: node:lts-alpine
command:
- sh
- -c
Expand Down
8 changes: 4 additions & 4 deletions deploy/k8s/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ spec:
initContainers:
- name: prepare
imagePullPolicy: IfNotPresent
image: node:18-alpine
image: node:lts-alpine
command:
- sh
- -c
- apk add git && git clone https://github.com/OnFinality-io/subql-examples /subquery && cd /subquery/block-timestamp && npm i -g @subql/cli && yarn && subql codegen && yarn build
volumeMounts:
- name: project-dir
mountPath: '/subquery'
mountPath: "/subquery"
containers:
- name: indexer
imagePullPolicy: IfNotPresent
Expand All @@ -53,7 +53,7 @@ spec:
value: postgres
volumeMounts:
- name: project-dir
mountPath: '/subquery'
mountPath: "/subquery"
securityContext:
runAsUser: 1000

Expand Down Expand Up @@ -176,5 +176,5 @@ spec:
- name: HASURA_GRAPHQL_DATABASE_URL
value: postgres://postgres:postgres@subquery-db-svc:5432/postgres
- name: HASURA_GRAPHQL_ENABLE_CONSOLE
value: 'true'
value: "true"
terminationGracePeriodSeconds: 300
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@babel/preset-env": "^7.16.11",
"@geut/chan": "^3.2.9",
"@octokit/request": "^8.4.0",
"@types/node": "^18.19.42",
"@types/node": "^22.12.0",
"@types/node-fetch": "2.6.11",
"@typescript-eslint/eslint-plugin": "5",
"@typescript-eslint/parser": "5",
Expand Down
4 changes: 2 additions & 2 deletions packages/node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM node:18-alpine as builder
FROM node:lts-alpine as builder
# Set working directory
WORKDIR /app

Expand All @@ -16,7 +16,7 @@ COPY ./scripts/build.sh ./scripts/build.sh
RUN ./scripts/build.sh packages/node

# Production stage
FROM node:18-alpine
FROM node:lts-alpine

# Copy .tgz file from builder
COPY --from=builder /app/packages/node/app.tgz /app.tgz
Expand Down
4 changes: 2 additions & 2 deletions packages/query/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build stage
FROM node:18-alpine as builder
FROM node:lts-alpine as builder

# Set working directory
WORKDIR /app
Expand All @@ -17,7 +17,7 @@ COPY ./scripts/build.sh ./scripts/build.sh
RUN ./scripts/build.sh packages/query

# Production stage
FROM node:18-alpine
FROM node:lts-alpine

# Copy .tgz file from builder
COPY --from=builder /app/packages/query/app.tgz /app.tgz
Expand Down
Loading
Loading