Share version between local and host part of the llv apps. Share loca… #92
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Local LV Kanban - Build & E2E | |
| on: | |
| push: | |
| branches: ["**"] | |
| paths: | |
| - "examples/local-lv-kanban/**" | |
| - "local-live-view/**" | |
| - ".github/workflows/local_lv_kanban_e2e_test.yml" | |
| - "pnpm-workspace.yaml" | |
| - "pnpm-lock.yaml" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| CI: true | |
| # Use the runner's preinstalled Google Chrome instead of downloading Playwright's | |
| # bundled chromium (that download hangs on the runner). Read by playwright.config.js. | |
| PW_CHANNEL: chrome | |
| jobs: | |
| test: | |
| name: Build & test (unit + e2e) | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| defaults: | |
| run: | |
| working-directory: examples/local-lv-kanban | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup toolchain | |
| uses: ./.github/actions/setup-toolchain | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| cache: "pnpm" | |
| cache-dependency-path: pnpm-lock.yaml | |
| - name: Install JS dependencies | |
| run: pnpm install | |
| working-directory: . | |
| - name: Restore dependencies cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| examples/local-lv-kanban/deps | |
| examples/local-lv-kanban/_build | |
| key: ${{ runner.os }}-mix-local_lv_kanban-${{ hashFiles('examples/local-lv-kanban/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix-local_lv_kanban- | |
| - name: Install Hex dependencies | |
| run: mix deps.get | |
| # The e2e test starts the Phoenix endpoint in-process (MIX_ENV=test) and serves | |
| # prebuilt assets, but esbuild/tailwind are dev-only deps — so build app.js/app.css | |
| # up front in :dev. The WASM bundle + AtomVM.* come from `mix llv.build` (run by the | |
| # `mix test` alias), and the test DB is created/migrated by that same alias. | |
| - name: Build browser assets | |
| run: | | |
| MIX_ENV=dev mix assets.setup | |
| MIX_ENV=dev mix assets.build | |
| # No Playwright browser-install step: the e2e uses the runner's preinstalled | |
| # Google Chrome via PW_CHANNEL=chrome (set above). Downloading Playwright's | |
| # bundled chromium hangs on the runner, regardless of version/method. | |
| - name: Run tests (unit + e2e) | |
| run: mix test | |
| # On failure, the Playwright HTML report (with traces, screenshots, and | |
| # video of each failing test) is the only way to see *why* a test timed | |
| # out — the console list output never says which locator it was waiting on. | |
| - name: Upload Playwright report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: | | |
| examples/local-lv-kanban/test/playwright/playwright-report | |
| examples/local-lv-kanban/test/playwright/test-results | |
| retention-days: 7 | |
| if-no-files-found: ignore |