OPSX 3: LiveView OpenClaw Chat Interface #15
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Also reusable by other workflows | |
| workflow_call: | |
| env: | |
| MIX_ENV: test | |
| ELIXIR_VERSION: "1.19" | |
| OTP_VERSION: "27" | |
| NODE_VERSION: "22" | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "npm" | |
| cache-dependency-path: assets/package-lock.json | |
| - name: Cache Elixir deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Install Elixir dependencies | |
| run: mix deps.get | |
| - name: Install Node dependencies | |
| run: npm ci --prefix assets | |
| - name: Compile (warnings as errors) | |
| run: mix compile --warnings-as-errors | |
| - name: Check Elixir formatting | |
| run: mix format --check-formatted | |
| - name: Run Credo | |
| run: mix credo --strict | |
| - name: Run Dialyzer | |
| run: mix dialyzer | |
| - name: Check JS/TS formatting | |
| run: npm run format:check --prefix assets | |
| - name: Check TypeScript types | |
| run: npm run types:check --prefix assets | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: reify_studio_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Elixir | |
| uses: erlef/setup-beam@v1 | |
| with: | |
| elixir-version: ${{ env.ELIXIR_VERSION }} | |
| otp-version: ${{ env.OTP_VERSION }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: "npm" | |
| cache-dependency-path: assets/package-lock.json | |
| - name: Cache Elixir deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-mix-${{ env.ELIXIR_VERSION }}-${{ env.OTP_VERSION }}- | |
| - name: Install Elixir dependencies | |
| run: mix deps.get | |
| - name: Install Node dependencies | |
| run: npm ci --prefix assets | |
| - name: Run tests | |
| env: | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/reify_test | |
| run: mix test |