Skip to content

Commit

Permalink
Updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrwitek committed Oct 16, 2024
1 parent 292ac2e commit 6149dbe
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 19 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/'))
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.12
18

0 comments on commit 6149dbe

Please sign in to comment.