-
-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (39 loc) · 1.37 KB
/
run-create-plugma.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Run create-plugma
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch: # Allows manual triggering
jobs:
test-cli:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: |
cd packages/create-plugma # Navigate to the subfolder containing your CLI
npm install
- name: Install expect
run: sudo apt-get install -y expect
- name: Run create-plugma CLI
run: |
expect <<EOF
spawn npx create-plugma
expect "Select a framework:"
send "\r"
expect "Select a variant:"
send "\r"
expect "Project name:"
send "TestProject\r"
expect "Next:"
EOF
- name: Check if project directory was created
run: |
test -d TestProject # Confirm the project directory was created
test -f TestProject/package.json # Check for package.json as an indicator of successful setup