2.8.5 #55
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20, 22] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build CLI | |
| run: npm run build | |
| - name: Verify CLI works | |
| run: | | |
| node bin/index.js --version | |
| node bin/index.js --help | |
| - name: Test project creation (React) | |
| run: | | |
| mkdir -p /tmp/test-projects | |
| cd /tmp/test-projects | |
| node ${{ github.workspace }}/bin/index.js test-react-project --template react | |
| cd test-react-project | |
| npm i pnpm -g | |
| pnpm install | |
| pnpm build | |
| - name: Test project creation (Vue) | |
| run: | | |
| cd /tmp/test-projects | |
| node ${{ github.workspace }}/bin/index.js test-vue-project --template vue | |
| cd test-vue-project | |
| npm i pnpm -g | |
| pnpm install | |
| pnpm build | |
| - name: Test project creation (Vue-mobile) | |
| run: | | |
| cd /tmp/test-projects | |
| node ${{ github.workspace }}/bin/index.js test-vue-mobile-project --template vue-mobile | |
| cd test-vue-mobile-project | |
| npm i pnpm -g | |
| pnpm install | |
| pnpm build | |
| - name: Test project creation (Chrome Extension) | |
| run: | | |
| cd /tmp/test-projects | |
| node ${{ github.workspace }}/bin/index.js test-ext-project --template extension | |
| cd test-ext-project | |
| npm i pnpm -g | |
| pnpm install | |
| pnpm build |