Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
yyyyaaa committed Jun 7, 2024
1 parent e0db877 commit 34f6d9d
Showing 1 changed file with 31 additions and 94 deletions.
125 changes: 31 additions & 94 deletions .github/workflows/run-tests-build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: CI

name: Build Next.js examples
on:
pull_request:
types: [opened, reopened, synchronize]
Expand All @@ -12,117 +11,55 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
node-version: ${{ matrix.node-version }}
cache: yarn

- name: Enable Corepack
- name: Install Yarn
run: corepack enable

- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v4
with:
path: |
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install

- name: Cache asset-list Next.js build
id: nextjs-cache-asset-list
uses: actions/cache@v4
with:
path: ./examples/asset-list/.next/cache
key: ${{ runner.os }}-nextjs-asset-list-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-nextjs-asset-list-
- name: Install asset-list dependencies
working-directory: ./examples/asset-list
run: yarn install
working-directory: ${{ inputs.cwd }}
run: yarn install --immutable --inline-builds

- name: Build asset-list
working-directory: ./examples/asset-list
run: yarn build

- name: Cache authz Next.js build
id: nextjs-cache-authz
uses: actions/cache@v4
with:
path: ./examples/authz/.next/cache
key: ${{ runner.os }}-nextjs-authz-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-nextjs-authz-
- name: Install authz dependencies
working-directory: ./examples/authz
run: yarn install
run: yarn install && yarn build

- name: Build authz
working-directory: ./examples/authz
run: yarn build

- name: Cache vote-proposal Next.js build
id: nextjs-cache-vote-proposal
uses: actions/cache@v4
with:
path: ./examples/vote-proposal/.next/cache
key: ${{ runner.os }}-nextjs-vote-proposal-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-nextjs-vote-proposal-
- name: Install vote-proposal dependencies
working-directory: ./examples/vote-proposal
run: yarn install
run: yarn install && yarn build

- name: Build vote-proposal
working-directory: ./examples/vote-proposal
run: yarn build

- name: Cache ibc-transfer Next.js build
id: nextjs-cache-ibc-transfer
uses: actions/cache@v4
with:
path: ./examples/ibc-transfer/.next/cache
key: ${{ runner.os }}-nextjs-ibc-transfer-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-nextjs-ibc-transfer-
- name: Install ibc-transfer dependencies
working-directory: ./examples/ibc-transfer
run: yarn install
run: yarn install && yarn build

- name: Build ibc-transfer
working-directory: ./examples/ibc-transfer
run: yarn build

- name: Cache swap-tokens Next.js build
id: nextjs-cache-swap-tokens
uses: actions/cache@v4
with:
path: ./examples/swap-tokens/.next/cache
key: ${{ runner.os }}-nextjs-swap-tokens-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-nextjs-swap-tokens-
- name: Install swap-tokens dependencies
working-directory: ./examples/swap-tokens
run: yarn install
run: yarn install && yarn build

- name: Build swap-tokens
working-directory: ./examples/swap-tokens
run: yarn build
run: yarn install && yarn build

- name: Build provide-liquidity
working-directory: ./examples/provide-liquidity
run: yarn install && yarn build

- name: Build nft
working-directory: ./examples/nft
run: yarn install && yarn build

- name: Build connect-chain
working-directory: ./examples/connect-chain
run: yarn install && yarn build

- name: Build connect-multi-chain
working-directory: ./examples/connect-multi-chain
run: yarn install && yarn build

- name: Cache provide-liquidity Next.js build
id: nextjs-cache-provide-liquidity
uses: actions/cache@v
- name: Build website
working-directory: ./examples/website
run: yarn install && yarn build

0 comments on commit 34f6d9d

Please sign in to comment.