Skip to content

refactor: clean up init script utils #138

refactor: clean up init script utils

refactor: clean up init script utils #138

Workflow file for this run

name: Test Templates
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 22]
pm: [npm, pnpm, yarn]
template: [
gill-next-tailwind,
# gill-next-tailwind-basic,
# gill-next-tailwind-counter,
gill-node-express,
gill-node-script,
gill-react-vite-tailwind,
# gill-react-vite-tailwind-basic,
# gill-react-vite-tailwind-counter,
web3js-next-tailwind,
web3js-next-tailwind-basic,
web3js-next-tailwind-counter,
web3js-react-vite-tailwind,
web3js-react-vite-tailwind-basic,
web3js-react-vite-tailwind-counter,
]
steps:
- name: Setup Anchor
uses: metadaoproject/setup-anchor@v3.1
with:
anchor-version: '0.30.1'
solana-cli-version: '2.0.21'
node-version: ${{ matrix.node }}
- name: Configure Git identity
run: |
git config --global user.email "ci-bot@example.com"
git config --global user.name "CI Bot"
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: pnpm install
- run: pnpm build
- name: Install package manager (if needed)
run: |
case ${{ matrix.pm }} in
npm) echo "Using npm";;
pnpm) npm install -g pnpm;;
yarn) npm install -g yarn;;
esac
- name: Create and Build using create-solana-dapp
run: |
TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR"
CLI_PATH="${{ github.workspace }}/dist/bin/index.cjs"
case ${{ matrix.pm }} in
npm) node "$CLI_PATH" --template ${{ matrix.template }} sandbox ;;
pnpm) node "$CLI_PATH" --template ${{ matrix.template }} sandbox --pnpm ;;
yarn) node "$CLI_PATH" --template ${{ matrix.template }} sandbox --yarn ;;
esac
cd sandbox
${{ matrix.pm }} install
${{ matrix.pm }} run build