forked from LayerZero-Labs/devtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪚 Composite actions (LayerZero-Labs#160)
- Loading branch information
1 parent
1885df4
commit 597a7b4
Showing
5 changed files
with
81 additions
and
84 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
.github/workflows/actions/install-dependencies/action.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Install project dependencies | ||
description: Install everything we need to build this repo | ||
inputs: | ||
NPM_TOKEN: | ||
description: "NPM_TOKEN that grants permissions to private @layerzerolabs packages" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
# Fetch the dependencies without running the post-install scripts | ||
- name: Fetch Dependencies | ||
shell: bash | ||
run: pnpm fetch --frozen-lockfile --prefer-offline --ignore-scripts | ||
env: | ||
NPM_TOKEN: ${{ inputs.NPM_TOKEN }} | ||
|
||
# Install the dependencies and run the post-install scripts | ||
- name: Install Dependencies | ||
shell: bash | ||
run: pnpm install --frozen-lockfile --offline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Setup build cache | ||
description: Setup cache for turbo builds & hardhat compilers | ||
runs: | ||
using: "composite" | ||
steps: | ||
# Cache build artifacts from turbo | ||
# | ||
# This step will speed up workflow runs that don't touch the whole codebase | ||
# (or the ones that don't touch the codebase at all) | ||
- name: Cache turbo build setup | ||
uses: actions/cache@v3 | ||
with: | ||
path: node_modules/.cache/turbo | ||
key: ${{ runner.os }}-turbo-${{ github.ref_name }} | ||
restore-keys: | | ||
${{ runner.os }}-turbo- | ||
# Cache hardhat compilers | ||
# | ||
# This step will speed up workflow runs that use hardhat compilation | ||
- name: Cache hardhat compilers | ||
uses: actions/cache@v3 | ||
with: | ||
path: .cache/hardhat | ||
key: ${{ runner.os }}-hardhat-${{ github.ref_name }} | ||
restore-keys: | | ||
${{ runner.os }}-hardhat- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Setup environment | ||
description: Setup node & package manager, checkout code | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: pnpm/action-setup@v2 | ||
name: Install pnpm | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: "pnpm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters