Skip to content

Commit

Permalink
ci: bump node.js to v20 and use pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangssu committed Jan 8, 2024
1 parent 3f41691 commit e00548a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 40 deletions.
45 changes: 22 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: ci
on:
push:
branches:
- dev
- dev
tags:
- '*.*.*'

Expand Down Expand Up @@ -33,39 +33,38 @@ jobs:
go-version: '1.21'
- run: go mod download

- name: Setup Node.js 16.x
uses: actions/setup-node@master
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version: 20

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Yarn Cache
uses: actions/cache@v3
id: yarn-cache
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Install dependencies
run: pnpm install

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-d369d2486f85576eec4ca41d277391dfdae21ba7

- name: Build
run: yarn build

- name: Run Tests
env:
E2E_DISABLE_PARALLEL: true
run: make test
run: pnpm build

- name: Docker Image Name
id: docker-image-name
Expand Down
41 changes: 24 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,41 @@ jobs:
go-version: '1.21'
- run: go mod download

- name: Setup Node.js 16.x
uses: actions/setup-node@master
- name: Setup Node.js using .nvmrc
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version-file: .nvmrc

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Yarn Cache
uses: actions/cache@v3
id: yarn-cache
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Install dependencies
run: pnpm install

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-d369d2486f85576eec4ca41d277391dfdae21ba7

- name: Build
run: yarn build
run: pnpm build

- name: Generate L1 allocs
run: make devnet-allocs

- name: Run tests
env:
Expand Down

0 comments on commit e00548a

Please sign in to comment.