From 8bae22d935643cf1797b89ff1db7fd120aff6313 Mon Sep 17 00:00:00 2001 From: Archit Date: Wed, 31 May 2023 18:04:36 +0530 Subject: [PATCH] update ci + node 18 --- .github/workflows/alphas.yml | 44 ++++----------- .github/workflows/binance.yml | 46 ++++------------ .github/workflows/ci.yml | 22 ++------ .github/workflows/develop.yml | 49 ++++++----------- .github/workflows/master.yml | 100 +++++++++++----------------------- .nvmrc | 2 +- package.json | 4 +- 7 files changed, 78 insertions(+), 189 deletions(-) diff --git a/.github/workflows/alphas.yml b/.github/workflows/alphas.yml index 959cd9828..638c7cf84 100644 --- a/.github/workflows/alphas.yml +++ b/.github/workflows/alphas.yml @@ -11,35 +11,23 @@ jobs: name: Test release strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Pre-build setup run: npm run pre-build @@ -57,7 +45,7 @@ jobs: name: Build & deploy alpha*.tor.us strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -65,28 +53,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Run build run: npm run build:alpha-branches diff --git a/.github/workflows/binance.yml b/.github/workflows/binance.yml index 66f557641..18c9f05a6 100644 --- a/.github/workflows/binance.yml +++ b/.github/workflows/binance.yml @@ -11,37 +11,25 @@ jobs: name: Test release strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ssh-key: ${{ secrets.ALPHA_SSH_KEY }} - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Pre-build setup run: npm run pre-build @@ -59,7 +47,7 @@ jobs: name: Build & deploy binance.tor.us strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -67,37 +55,25 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ssh-key: ${{ secrets.ALPHA_SSH_KEY }} - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + cache: 'npm' - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 + uses: aws-actions/configure-aws-credentials@v2 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- - - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Run build run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a393b438b..5cfb4ebc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,35 +15,23 @@ jobs: name: ci strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm instal - name: Pre-build setup run: npm run pre-build diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 082216d0c..60c690341 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -11,35 +11,23 @@ jobs: name: Test release strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Pre-build setup run: npm run pre-build @@ -57,7 +45,7 @@ jobs: name: Build & deploy testing.tor.us strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -65,10 +53,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} @@ -86,7 +74,7 @@ jobs: ${{ matrix.os }}-node- - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Run build run: npm run build:testing @@ -117,7 +105,7 @@ jobs: name: Build & deploy lrc.tor.us strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -125,10 +113,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} @@ -165,10 +153,9 @@ jobs: # Invalidate Cloudfront (this action) - name: invalidate - uses: chetan/invalidate-cloudfront-action@master - env: - DISTRIBUTION: ${{ secrets.DISTRIBUTION_LRC_TOR_US }} - PATHS: '/*' - AWS_REGION: 'us-east-1' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + uses: chaitanyapotti/cloudfront-update-distribution@v2 + with: + cloudfront-distribution-id: ${{ secrets.DISTRIBUTION_LRC_TOR_US }} + cloudfront-invalidation-path: '/*' + cloudfront-invalidation-required: true + cloudfront-wait-for-service-update: false diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index f6abd7b6c..5c0785bc4 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -11,37 +11,25 @@ jobs: name: Test release strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ssh-key: ${{ secrets.ALPHA_SSH_KEY }} - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Pre-build setup run: npm run pre-build @@ -59,7 +47,7 @@ jobs: name: Build & deploy app.tor.us strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -67,12 +55,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: ssh-key: ${{ secrets.ALPHA_SSH_KEY }} - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} @@ -97,7 +85,7 @@ jobs: ${{ matrix.os }}-node- - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Run build run: | @@ -132,7 +120,7 @@ jobs: name: Build & deploy bnb.tor.us strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -140,28 +128,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Run build run: npm run build:bnb @@ -180,19 +156,18 @@ jobs: # Invalidate Cloudfront (this action) - name: invalidate - uses: chetan/invalidate-cloudfront-action@master - env: - DISTRIBUTION: ${{ secrets.DISTRIBUTION_BNB_TOR_US }} - PATHS: '/*' - AWS_REGION: 'us-east-1' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + uses: chaitanyapotti/cloudfront-update-distribution@v2 + with: + cloudfront-distribution-id: ${{ secrets.DISTRIBUTION_BNB_TOR_US }} + cloudfront-invalidation-path: '/*' + cloudfront-invalidation-required: true + cloudfront-wait-for-service-update: false build-deploy-polygon: name: Build & deploy polygon.tor.us strategy: matrix: - node: ['16.x'] + node: ['18.x'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} @@ -200,28 +175,16 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: setup node - uses: actions/setup-node@v2 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - - - name: Get npm cache directory - id: npm-cache - run: | - echo "::set-output name=dir::$(npm config get cache)" - - - name: Node dependency cache - uses: actions/cache@v2 - with: - path: ${{ steps.npm-cache.outputs.dir }} - key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ matrix.os }}-node- + cache: 'npm' - name: Install dependencies - run: npm install --legacy-peer-deps + run: npm install - name: Run build run: npm run build:polygon @@ -240,10 +203,9 @@ jobs: # Invalidate Cloudfront (this action) - name: invalidate - uses: chetan/invalidate-cloudfront-action@master - env: - DISTRIBUTION: ${{ secrets.DISTRIBUTION_POLYGON_TOR_US }} - PATHS: '/*' - AWS_REGION: 'us-east-1' - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + uses: chaitanyapotti/cloudfront-update-distribution@v2 + with: + cloudfront-distribution-id: ${{ secrets.DISTRIBUTION_POLYGON_TOR_US }} + cloudfront-invalidation-path: '/*' + cloudfront-invalidation-required: true + cloudfront-wait-for-service-update: false diff --git a/.nvmrc b/.nvmrc index 4d7aff3bd..72b05949e 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ ->=v14.17 +>=v16.18.1 diff --git a/package.json b/package.json index cb5c49bd7..f8ba04ad5 100644 --- a/package.json +++ b/package.json @@ -185,8 +185,8 @@ "worker-loader": "^3.0.8" }, "engines": { - "node": ">=14.17.0", - "npm": ">=6.x" + "node": ">=16.18.1", + "npm": ">=8.x" }, "lint-staged": { "*.{js,vue}": "eslint --cache --fix",