Update deps #2
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
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 |