From 6149dbe183396962647a9820fe7352aec7c456b8 Mon Sep 17 00:00:00 2001 From: Piotr Witek <739075+piotrwitek@users.noreply.github.com> Date: Wed, 16 Oct 2024 18:38:12 +0200 Subject: [PATCH] Updated workflows --- .github/workflows/lint.yaml | 32 +++++++++++++++++++------------- .github/workflows/tests.yaml | 10 +++++----- .nvmrc | 2 +- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 02866b5a9..f2a5dfeee 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -7,25 +7,30 @@ on: pull_request: workflow_dispatch: inputs: - force_lint_files: - description: 'Force lint files (true/false)' + cache: + description: 'Should use dependency cache' + required: false + default: 'true' + clean: + description: 'Clean cache before install' required: false default: 'false' + jobs: files: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Check out repository + uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 with: - node-version: 18.12.1 - - - name: Clear Yarn cache - run: yarn cache clean + node-version-file: '.nvmrc' - - name: Cache Yarn dependencies + - name: Cache node modules uses: actions/cache@v3 + if: github.event.inputs.cache == 'true' with: path: | ~/.cache/yarn @@ -34,16 +39,17 @@ jobs: restore-keys: | ${{ runner.OS }}-yarn-cache- - - name: Clear Yarn cache + - name: Clean Yarn cache + if: github.event.inputs.clean == 'true' run: yarn cache clean - - name: Install - run: yarn --no-progress --non-interactive --frozen-lockfile + - name: Install dependencies + run: yarn install - name: Build packages run: yarn build env: - BLOCK_NUMBER: 15946543 + BLOCK_NUMBER: 20971320 NETWORK_FORK: 'mainnet' MAINNET_URL: ${{ secrets.MAINNET_URL }} PRIV_KEY_MAINNET: ${{ secrets.PRIV_KEY_MAINNET }} diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 679304e74..a5666b54a 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -34,7 +34,7 @@ jobs: - name: Cache node modules id: cache-node-modules - uses: actions/cache@v2 + uses: actions/cache@v3 if: (github.event.inputs.force_run_tests == 'true') || (contains(steps.changed-files.outputs.all_changed_and_modified_files, 'packages/')) @@ -44,12 +44,12 @@ jobs: - name: Install node id: install-node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 if: (github.event.inputs.force_run_tests == 'true') || (contains(steps.changed-files.outputs.all_changed_and_modified_files, 'packages/')) with: - node-version: '16.x' + node-version-file: '.nvmrc' - name: Install dependencies id: install-dependencies @@ -65,7 +65,7 @@ jobs: (contains(steps.changed-files.outputs.all_changed_and_modified_files, 'packages/')) run: yarn build env: - BLOCK_NUMBER: 17776518 + BLOCK_NUMBER: 20971320 NETWORK_FORK: mainnet MAINNET_URL: ${{ secrets.MAINNET_URL }} PRIV_KEY_MAINNET: ${{ secrets.PRIV_KEY_MAINNET }} @@ -78,7 +78,7 @@ jobs: (contains(steps.changed-files.outputs.all_changed_and_modified_files, 'packages/')) run: yarn test env: - BLOCK_NUMBER: 17776518 + BLOCK_NUMBER: 20971320 NETWORK_FORK: mainnet MAINNET_URL: ${{ secrets.MAINNET_URL }} PRIV_KEY_MAINNET: ${{ secrets.PRIV_KEY_MAINNET }} diff --git a/.nvmrc b/.nvmrc index c3e72bfa9..3c032078a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.12 \ No newline at end of file +18