Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 28 additions & 67 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
workflow_dispatch:

jobs:
lint-and-unit:
lint:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -35,49 +35,19 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build templates registry
run: npm run build:templates
- name: Build TypeScript
run: npm run build

- name: Lint
run: npm run lint

- name: Run unit tests
run: npm run test:unit

integration:
runs-on: ubuntu-latest
needs: lint-and-unit
defaults:
run:
working-directory: cli

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24.x
cache: npm
cache-dependency-path: cli/package-lock.json

- name: Install dependencies
run: npm ci

- name: Build templates registry
run: npm run build:templates

- name: Run integration tests
run: npm run test:integration

template-smoke-tests:
smoke-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20.x, 22.x, 24.x]
needs: lint-and-unit
node-version: [22.x, 24.x]
needs: lint
env:
FOUNDRY_PROFILE: ci
defaults:
Expand All @@ -103,47 +73,39 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Prepare libraries
run: npm run prepare:lib

- name: Build templates registry
run: npm run build:templates
- name: Build TypeScript
run: npm run build

- name: Smoke test Foundry default template
- name: Smoke test Foundry counter base
run: |
set -euo pipefail
rm -rf ci-foundry
node index.js init \
--name ci-foundry \
--template default \
node dist/index.js init ci-foundry \
--framework foundry \
--base counter \
--ownership owner \
--yes
cd ci-foundry
forge build

# TODO: Remove once @perfect-abstractions/compose is published to npm
# Currently, this make the Ci fail when trying to install the dependency.
# - name: Smoke test Hardhat default TypeScript template
# run: |
# set -euo pipefail
# rm -rf ci-hardhat
# node index.js init \
# --name ci-hardhat \
# --template default \
# --framework hardhat \
# --language typescript \
# --no-install-deps \
# --yes
# cd ci-hardhat
# npm install
# npm test
- name: Smoke test Hardhat counter base (ethers)
run: |
set -euo pipefail
rm -rf ci-hardhat
node dist/index.js init ci-hardhat \
--framework hardhat \
--toolbox ethers \
--base counter \
--ownership owner \
--yes
cd ci-hardhat
npx hardhat compile

pack-verify:
runs-on: ubuntu-latest
needs:
- lint-and-unit
- integration
- template-smoke-tests
- lint
- smoke-tests
defaults:
run:
working-directory: cli
Expand All @@ -162,9 +124,8 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Build templates registry
run: npm run build:templates
- name: Build TypeScript
run: npm run build

- name: Verify npm pack output
run: npm run pack:check

3 changes: 3 additions & 0 deletions cli/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ node_modules/
coverage/
dist/
tmp/
my-diamond/
*.tsbuildinfo
.vscode/
.env
.env.local

Expand Down
6 changes: 0 additions & 6 deletions cli/.gitmodules

This file was deleted.

5 changes: 3 additions & 2 deletions cli/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ test/
.github/
.cursor/
.tmp/
lib/
src/templates/**/foundry/lib/
tsconfig.json
eslint.config.js
*.log
Loading
Loading