-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9d27b3
commit 11db80c
Showing
2 changed files
with
102 additions
and
36 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,40 +1,40 @@ | ||
name: Node.js CI | ||
# name: Ethernaut cli CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
# on: | ||
# push: | ||
# branches: [main] | ||
# pull_request: | ||
# branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
# ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | ||
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
# strategy: | ||
# matrix: | ||
# node-version: [20.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm run compile --if-present | ||
- name: Start local chain | ||
run: | | ||
npm run chain & | ||
sleep 10 | ||
- run: cd packages/common && npm t | ||
- run: cd packages/ethernaut-toolbox && npm t | ||
- run: cd packages/ethernaut-ui && npm t | ||
- run: cd packages/ethernaut-interact && npm t | ||
- run: cd packages/ethernaut-challenges && npm t | ||
- run: cd packages/ethernaut-ai && npm t | ||
- run: cd packages/ethernaut-cli && npm t | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Use Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v2 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
# - run: npm ci | ||
# - run: npm run build --if-present | ||
# - run: npm run compile --if-present | ||
# - name: Start local chain | ||
# run: | | ||
# npm run chain & | ||
# sleep 10 | ||
# - run: cd packages/common && npm t | ||
# - run: cd packages/ethernaut-toolbox && npm t | ||
# - run: cd packages/ethernaut-ui && npm t | ||
# - run: cd packages/ethernaut-interact && npm t | ||
# - run: cd packages/ethernaut-challenges && npm t | ||
# - run: cd packages/ethernaut-ai && npm t | ||
# - run: cd packages/ethernaut-cli && npm t |
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,66 @@ | ||
name: Ethernaut CLI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
env: | ||
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
cache: 'npm' | ||
|
||
- name: Install root dependencies | ||
run: npm ci | ||
|
||
# Assuming your monorepo structure has a packages directory | ||
# Adjust paths as necessary for your monorepo structure | ||
- name: Cache node_modules for packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
./node_modules | ||
./packages/*/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
test-common: | ||
needs: prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Install | ||
run: npm ci | ||
working-directory: ./packages/common | ||
|
||
- name: Build | ||
run: npm run build | ||
working-directory: ./packages/common | ||
|
||
- name: Compile | ||
run: npm run compile | ||
working-directory: ./packages/common | ||
|
||
- name: Test | ||
run: npm t | ||
working-directory: ./packages/common |