-
-
Notifications
You must be signed in to change notification settings - Fork 759
129 lines (103 loc) · 3.9 KB
/
Copy pathcli-install.yml
File metadata and controls
129 lines (103 loc) · 3.9 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: "CI: CLI Install"
on:
push:
paths:
- 'cli/**'
- '.github/workflows/cli-install.yml'
branches: [main]
pull_request:
paths:
- 'cli/**'
- '.github/workflows/cli-install.yml'
workflow_dispatch:
jobs:
# ─────────────────────────────────────────────
# curl installer — macOS + Linux
# ─────────────────────────────────────────────
curl-install:
name: curl — ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
fail-fast: false
steps:
- uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'temurin'
- name: Run curl installer
run: sh cli/install.sh
- name: Verify atmosphere is on PATH
run: command -v atmosphere
- name: atmosphere version
run: atmosphere version
- name: atmosphere list
run: atmosphere list
- name: atmosphere list --tag ai
run: atmosphere list --tag ai
- name: atmosphere info spring-boot-chat
run: atmosphere info spring-boot-chat
# ─────────────────────────────────────────────
# npx — macOS + Linux
# ─────────────────────────────────────────────
npx-install:
name: npx — ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
fail-fast: false
steps:
- uses: actions/checkout@v7
- name: Setup Node.js 22
uses: actions/setup-node@v6
with:
node-version: 22
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'temurin'
# The npx wrapper delegates to the `atmosphere` CLI on PATH; install
# the in-repo CLI before invoking npx so the PATH check passes.
# (Without this, --help and --list-templates pass because they never
# exec the CLI, but the first scaffold step fails with
# "the atmosphere CLI is required but is not on PATH".)
- name: Put in-repo atmosphere CLI on PATH
run: echo "$GITHUB_WORKSPACE/cli" >> "$GITHUB_PATH"
- name: npx create-atmosphere-app --help
run: npx create-atmosphere-app --help
- name: npx create-atmosphere-app --list-templates
run: npx create-atmosphere-app --list-templates
- name: Scaffold a chat project
run: npx create-atmosphere-app test-chat-app
- name: Verify scaffolded project structure
run: |
test -f test-chat-app/pom.xml
test -f test-chat-app/src/main/resources/application.yml
echo "Project structure OK"
- name: Scaffold an AI chat project
run: npx create-atmosphere-app test-ai-app --template ai-chat
- name: Verify AI project structure
run: |
test -f test-ai-app/pom.xml
grep -q "atmosphere-ai" test-ai-app/pom.xml
echo "AI project structure OK"
# ─────────────────────────────────────────────
# Homebrew — macOS only
# ─────────────────────────────────────────────
brew-install:
name: brew — macos
runs-on: macos-latest
steps:
- name: Install Atmosphere CLI via Homebrew
run: brew install Atmosphere/tap/atmosphere
- name: atmosphere version
run: atmosphere version
- name: atmosphere list
run: atmosphere list
- name: atmosphere info spring-boot-chat
run: atmosphere info spring-boot-chat