feat(ci): enhance installer workflow with OS matrix and conditional smoke tests

This commit is contained in:
Abhimanyu Saharan
2026-03-05 01:39:38 +05:30
parent 532fbf1dc5
commit ba6726a99c

View File

@@ -136,8 +136,17 @@ jobs:
frontend/coverage/** frontend/coverage/**
installer: installer:
runs-on: ubuntu-latest name: Installer (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: [check] needs: [check]
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
run_smoke_tests: true
- os: macos-latest
run_smoke_tests: false
steps: steps:
- name: Checkout - name: Checkout
@@ -147,6 +156,7 @@ jobs:
run: bash -n install.sh run: bash -n install.sh
- name: Installer smoke test (docker mode) - name: Installer smoke test (docker mode)
if: ${{ matrix.run_smoke_tests }}
run: | run: |
./install.sh \ ./install.sh \
--mode docker \ --mode docker \
@@ -159,11 +169,12 @@ jobs:
curl -fsS http://127.0.0.1:13000 >/dev/null curl -fsS http://127.0.0.1:13000 >/dev/null
- name: Cleanup docker stack after docker mode - name: Cleanup docker stack after docker mode
if: always() if: ${{ always() && matrix.run_smoke_tests }}
run: | run: |
docker compose -f compose.yml --env-file .env down -v --remove-orphans || true docker compose -f compose.yml --env-file .env down -v --remove-orphans || true
- name: Installer smoke test (local mode) - name: Installer smoke test (local mode)
if: ${{ matrix.run_smoke_tests }}
run: | run: |
./install.sh \ ./install.sh \
--mode local \ --mode local \
@@ -178,23 +189,12 @@ jobs:
curl -fsS http://127.0.0.1:13001 >/dev/null curl -fsS http://127.0.0.1:13001 >/dev/null
- name: Cleanup local processes and docker resources - name: Cleanup local processes and docker resources
if: always() if: ${{ always() && matrix.run_smoke_tests }}
run: | run: |
if [ -f .install-logs/backend.pid ]; then kill "$(cat .install-logs/backend.pid)" || true; fi if [ -f .install-logs/backend.pid ]; then kill "$(cat .install-logs/backend.pid)" || true; fi
if [ -f .install-logs/frontend.pid ]; then kill "$(cat .install-logs/frontend.pid)" || true; fi if [ -f .install-logs/frontend.pid ]; then kill "$(cat .install-logs/frontend.pid)" || true; fi
docker compose -f compose.yml --env-file .env down -v --remove-orphans || true docker compose -f compose.yml --env-file .env down -v --remove-orphans || true
installer-macos:
runs-on: macos-latest
needs: [check]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate installer shell syntax (macOS)
run: bash -n install.sh
e2e: e2e:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [check] needs: [check]