1111 workflow_dispatch :
1212
1313jobs :
14- uvx-macos :
15- name : direct uvx (macOS)
16- runs-on : macos-14
14+ uvx :
15+ name : direct uvx (${{ matrix.os }})
16+ strategy :
17+ matrix :
18+ os : [macos-14, ubuntu-24.04]
19+ runs-on : ${{ matrix.os }}
1720 steps :
1821 - name : Checkout
1922 uses : actions/checkout@v4
@@ -23,41 +26,32 @@ jobs:
2326 run : |
2427 uvx open-edison --help
2528
26- uvx-ubuntu :
27- name : direct uvx (Ubuntu)
28- runs-on : ubuntu-24.04
29- steps :
30- - name : Checkout
31- uses : actions/checkout@v4
32- - name : Setup Open Edison
33- uses : ./.github/actions/setup
34- - name : direct uvx smoke (PyPI)
35- run : |
36- uvx open-edison --help
37-
38- curl-installer-ubuntu :
39- name : curl|bash installer (Ubuntu)
40- runs-on : ubuntu-24.04
41- steps :
42- - name : Curl installer smoke
43- shell : bash
44- run : |
45- set -euxo pipefail
46- curl -fsSL https://raw.githubusercontent.com/Edison-Watch/open-edison/main/curl_pipe_bash.sh | bash -s -- -h
47-
48- curl-installer-macos :
49- name : curl|bash installer (macOS)
50- runs-on : macos-14
29+ curl-installer :
30+ name : curl|bash installer (${{ matrix.os }})
31+ strategy :
32+ matrix :
33+ os : [macos-14, ubuntu-24.04]
34+ runs-on : ${{ matrix.os }}
5135 steps :
5236 - name : Curl installer smoke
5337 shell : bash
5438 run : |
5539 set -euxo pipefail
56- curl -fsSL https://raw.githubusercontent.com/Edison-Watch/open-edison/main/curl_pipe_bash.sh | bash -s -- -h
40+ REPO="${{ github.repository }}"
41+ REF="${{ github.ref_name }}"
42+ if [ "${{ github.event_name }}" = "pull_request" ]; then
43+ REPO="${{ github.event.pull_request.head.repo.full_name }}"
44+ REF="${{ github.event.pull_request.head.ref }}"
45+ fi
46+ echo "Using repo $REPO @ $REF"
47+ curl -fsSL "https://raw.githubusercontent.com/${REPO}/${REF}/curl_pipe_bash.sh" | bash -s -- -h
5748
58- clone-make-run-ubuntu :
59- name : clone & make run (Ubuntu)
60- runs-on : ubuntu-24.04
49+ clone-make-run :
50+ name : clone & make run (${{ matrix.os }})
51+ strategy :
52+ matrix :
53+ os : [macos-14, ubuntu-24.04]
54+ runs-on : ${{ matrix.os }}
6155 steps :
6256 - name : Checkout
6357 uses : actions/checkout@v4
8781 run : |
8882 if [ -f server.pid ]; then kill $(cat server.pid) || true; fi
8983
90- clone-make-run-macos :
91- name : clone & make run (macOS)
92- runs-on : macos-14
93- steps :
94- - name : Checkout
95- uses : actions/checkout@v4
96- - name : Setup Open Edison
97- uses : ./.github/actions/setup
98- - name : Setup Node
99- uses : actions/setup-node@v4
100- with :
101- node-version : ' 20'
102- cache : ' npm'
103- cache-dependency-path : frontend/package-lock.json
104- - name : make setup
105- run : make setup
106- - name : Start server
107- run : |
108- set -euxo pipefail
109- make run &
110- echo $! > server.pid
111- for i in {1..60}; do
112- if curl -sf http://localhost:3001/health >/dev/null; then
113- echo "server healthy"; break; fi; sleep 1; done
114- - name : Health check
115- run : curl -sf http://localhost:3001/health | tee /dev/stderr
116- - name : Stop server
117- if : always()
118- run : |
119- if [ -f server.pid ]; then kill $(cat server.pid) || true; fi
120-
121- docker-run-ubuntu :
122- name : clone & docker_run (Ubuntu)
123- runs-on : ubuntu-24.04
124- steps :
125- - name : Checkout
126- uses : actions/checkout@v4
127- - name : Build image
128- run : docker build -t open-edison:ci .
129- - name : Run container
130- run : |
131- docker run -d --name edison-ci -e OPEN_EDISON_CONFIG_DIR=/app -p 3001:3001 -v ${{ github.workspace }}/config.json:/app/config.json open-edison:ci
132- for i in {1..60}; do if curl -sf http://localhost:3001/health >/dev/null; then echo ok; break; fi; sleep 1; done
133- - name : Health check
134- run : curl -sf http://localhost:3001/health | tee /dev/stderr
135- - name : Cleanup
136- if : always()
137- run : |
138- docker logs edison-ci || true
139- docker rm -f edison-ci || true
140-
141- docker-run-macos :
142- name : clone & docker_run (macOS, self-hosted) [DISABLED]
143- # Disabled by default: GitHub-hosted macOS runners cannot run Docker due to lack of nested virtualization.
144- # See: https://github.com/marketplace/actions/setup-docker-on-macos
145- if : ${{ false }}
146- runs-on : [self-hosted, macos]
147- steps :
148- - name : Checkout
149- uses : actions/checkout@v4
150- - name : Install colima and docker (experimental)
151- run : |
152- brew update
153- brew install colima docker
154- colima start --cpu 2 --memory 4 --disk 10
155- - name : Build image
156- run : docker build -t open-edison:ci .
157- - name : Run container
158- run : |
159- docker run -d --name edison-ci -e OPEN_EDISON_CONFIG_DIR=/app -p 3001:3001 -v ${{ github.workspace }}/config.json:/app/config.json open-edison:ci
160- for i in {1..60}; do if curl -sf http://localhost:3001/health >/dev/null; then echo ok; break; fi; sleep 1; done
161- - name : Health check
162- run : curl -sf http://localhost:3001/health | tee /dev/stderr
163- - name : Cleanup
164- if : always()
165- run : |
166- docker logs edison-ci || true
167- docker rm -f edison-ci || true
168- colima stop || true
16984
17085
0 commit comments