Skip to content

Commit 04a9ad6

Browse files
authored
ci: node version is outdated (#1172)
- add cache
1 parent df64403 commit 04a9ad6

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

.github/workflows/mainnet.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,29 @@ on:
1010
# Allows you to run this workflow manually from the Actions tab
1111
workflow_dispatch:
1212

13+
env:
14+
node-version: 20
15+
1316
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1417
jobs:
1518
# This workflow contains a single job called "build"
1619
build:
1720
runs-on: ubuntu-latest
18-
strategy:
19-
matrix:
20-
node-version: [18]
21-
2221
steps:
2322
- name: Cancel Previous Runs
2423
uses: styfle/[email protected]
2524
with:
2625
access_token: ${{ github.token }}
27-
- uses: actions/checkout@v3
28-
- name: Use Node.js ${{ matrix.node-version }}
29-
uses: actions/setup-node@v3
26+
- uses: actions/checkout@v4
27+
- name: Use Node.js ${{ env.node-version }}
28+
uses: actions/setup-node@v4
3029
with:
31-
node-version: ${{ matrix.node-version }}
30+
node-version: ${{ env.node-version }}
3231
- name: Install Yarn
3332
run: npm install -g yarn
3433
- name: Get yarn cache directory path
3534
id: yarn-cache-dir-path
36-
run: echo "::set-output name=dir::$(yarn cache dir)"
35+
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
3736
# - uses: everpcpc/actions-cache@v2
3837
# env:
3938
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -51,10 +50,19 @@ jobs:
5150
# run: |
5251
# rm -rf node_modules/@oraichain/oraidex-universal-swap/node_modules/@oraichain/oraidex-common
5352
# rm -rf node_modules/@oraichain/oraiswap-v3/node_modules/@oraichain/oraidex-common
53+
- id: yarn-cache
54+
uses: actions/cache@v4
55+
with:
56+
path: |
57+
${{ steps.yarn-cache-dir-path.outputs.dir }}
58+
node_modules
59+
node_modules/.cache
60+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
61+
restore-keys: ${{ runner.os }}-yarn-
5462
- name: Install Dependencies
55-
if: steps.yarn-cache.outputs.cache-hit != 'true'
63+
# if: steps.yarn-cache.outputs.cache-hit != 'true'
5664
# run: yarn install --ignore-scripts
57-
run: yarn
65+
run: yarn install --frozen-lockfile
5866
- name: Copy env
5967
run: cp .env.example .env
6068
- name: Build Production

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
"cosmjs-types@>0.8.0 <1": "0.9.0"
179179
},
180180
"engines": {
181-
"node": "^18 || ^20"
181+
"node": "^20"
182182
},
183183
"packageManager": "[email protected]"
184184
}

0 commit comments

Comments
 (0)