Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eternauta1337 committed Feb 24, 2024
1 parent 561efd6 commit 019c2f9
Showing 1 changed file with 25 additions and 47 deletions.
72 changes: 25 additions & 47 deletions .github/workflows/ci1.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ethernaut CLI
name: Ethernaut cli CI

on:
push:
Expand All @@ -12,55 +12,33 @@ env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

jobs:
prepare:
test-common:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
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
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
path: |
./node_modules
./packages/*/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
test-common:
needs: prepare
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run compile --if-present
- run: cd packages/common && npm t
test-toolbox:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
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
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm run compile --if-present
- run: cd packages/ethernaut-toolbox && npm t

0 comments on commit 019c2f9

Please sign in to comment.