HARMONY-1573: Added more debugs. #23
This file contains 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: Harmony in a box | |
on: [push, pull_request] | |
jobs: | |
harmony-in-a-box: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Install setuptools | |
run: sudo -H pip install setuptools | |
- name: Install docker | |
run: | | |
brew update | |
brew install docker | |
brew install kubectl | |
colima start --cpu 3 --memory 12 --with-kubernetes | |
- name: Install dependencies | |
run: npm ci | |
- name: Build all images | |
run: | | |
npm run build-all | |
docker images | |
- name: list images | |
run: docker images | |
- name: Start harmony in a box | |
run: KUBE_CONTEXT=colima bin/bootstrap-harmony | |
- name: Wait for the server to start | |
run: kubectl -n harmony get pods | |
- name: Run curl against harmony | |
id: curl | |
run: | | |
HTTP_STATUS=$(curl -I -s -o /dev/null -w "%{http_code}" http://localhost:3000) | |
echo "::set-output name=http_status::$HTTP_STATUS" | |
- name: Check HTTP status code | |
run: | | |
if [[ "${{ steps.curl.outputs.http_status }}" -eq 200 ]]; then | |
echo "HTTP request was successful!" | |
else | |
echo "HTTP request failed with status code ${{ steps.curl.outputs.http_status }}" | |
exit 1 | |
fi |