Skip to content

πŸ”– Prepare for new release #11

πŸ”– Prepare for new release

πŸ”– Prepare for new release #11

Workflow file for this run

name: CLI
on:
push:
branches:
- main
pull_request:
defaults:
run:
working-directory: ./libs/create-qwikdev-astro
jobs:
test:
name: πŸ§ͺ Test the CLI on ${{ matrix.runtime }} under ${{ matrix.os }} using ${{ matrix.package_manager }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runtime: [node, deno, bun]
package_manager: [npm, pnpm]
exclude:
- runtime: deno
package_manager: pnpm
- runtime: bun
package_manager: pnpm
steps:
- name: 🚚 Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
if: matrix.runtime == 'node'
uses: actions/setup-node@v3
with:
node-version: 22
- name: Set up Deno
if: matrix.runtime == 'deno'
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Set up Bun
if: matrix.runtime == 'bun'
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: ⚑️Install dependencies
run: |
if [[ "${{ matrix.runtime }}" == "node" ]]; then
corepack enable
corepack prepare ${{ matrix.package_manager }}@latest --activate
${{ matrix.package_manager }} install
elif [[ "${{ matrix.runtime }}" == "deno" ]]; then
deno install
elif [[ "${{ matrix.runtime }}" == "bun" ]]; then
bun install
fi
shell: bash
- name: πŸ“¦οΈ Build the package
run: |
if [[ "${{ matrix.runtime }}" == "node" ]]; then
${{ matrix.package_manager }} run build
elif [[ "${{ matrix.runtime }}" == "deno" ]]; then
deno task build
elif [[ "${{ matrix.runtime }}" == "bun" ]]; then
bun run build
fi
shell: bash
- name: βœ… Test CLI
run: |
if [[ "${{ matrix.runtime }}" == "node" ]]; then
${{ matrix.package_manager }} run test
elif [[ "${{ matrix.runtime }}" == "deno" ]]; then
deno task test
elif [[ "${{ matrix.runtime }}" == "bun" ]]; then
bun run test
fi
shell: bash