Files
sencho/.github/actions/start-app/action.yml
T
dependabot[bot] 741ed61c2f chore(deps): bump the all-actions group across 2 directories with 7 updates (#1174)
Bumps the all-actions group with 6 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `4.0.0` | `4.1.0` |
| [docker/build-push-action](https://github.com/docker/build-push-action) | `7.1.0` | `7.2.0` |
| [github/codeql-action](https://github.com/github/codeql-action) | `4.35.5` | `4.36.0` |
| [docker/login-action](https://github.com/docker/login-action) | `4.1.0` | `4.2.0` |
| [docker/metadata-action](https://github.com/docker/metadata-action) | `6.0.0` | `6.1.0` |
| [actions/stale](https://github.com/actions/stale) | `10.2.0` | `10.3.0` |

Bumps the all-actions group with 1 update in the /.github/actions/start-app directory: [actions/cache](https://github.com/actions/cache).


Updates `docker/setup-buildx-action` from 4.0.0 to 4.1.0
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd...d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5)

Updates `docker/build-push-action` from 7.1.0 to 7.2.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/bcafcacb16a39f128d818304e6c9c0c18556b85f...f9f3042f7e2789586610d6e8b85c8f03e5195baf)

Updates `github/codeql-action` from 4.35.5 to 4.36.0
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/9e0d7b8d25671d64c341c19c0152d693099fb5ba...7211b7c8077ea37d8641b6271f6a365a22a5fbfa)

Updates `docker/login-action` from 4.1.0 to 4.2.0
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/4907a6ddec9925e35a0a9e82d7399ccc52663121...650006c6eb7dba73a995cc03b0b2d7f5ca915bee)

Updates `docker/metadata-action` from 6.0.0 to 6.1.0
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/030e881283bb7a6894de51c315a6bfe6a94e05cf...80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9)

Updates `actions/stale` from 10.2.0 to 10.3.0
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/b5d41d4e1d5dceea10e7104786b73624c18a190f...eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899)

Updates `actions/cache` from 4.3.0 to 5.0.5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/0057852bfaa89a56745cba8c7296529d2fc39830...27d5ce7f107fe9357f9df03efb73ab90386fccae)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: 4.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-actions
- dependency-name: docker/build-push-action
  dependency-version: 7.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-actions
- dependency-name: github/codeql-action
  dependency-version: 4.36.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-actions
- dependency-name: docker/login-action
  dependency-version: 4.2.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-actions
- dependency-name: docker/metadata-action
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-actions
- dependency-name: actions/stale
  dependency-version: 10.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: all-actions
- dependency-name: actions/cache
  dependency-version: 5.0.5
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: all-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-23 03:07:34 -04:00

120 lines
4.2 KiB
YAML

name: Start Sencho App
description: >
Shared setup for integration jobs: installs deps, builds backend,
starts backend + frontend dev servers, waits for readiness,
and installs Playwright browsers.
inputs:
jwt-secret:
required: false
default: 'ci-test-secret-key-not-for-production'
compose-dir:
required: false
default: '/tmp/compose'
port:
required: false
default: '1852'
skip-backend-build:
description: >
When 'true', skip running `npm run build` in backend/ and assume the
caller has already materialized backend/dist (e.g. via download-artifact
from an upstream job that already built and verified it). Leave 'false'
for standalone invocations that do not run in a job graph with a
prior build step.
required: false
default: 'false'
runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version-file: '.node-version'
cache: 'npm'
cache-dependency-path: |
package-lock.json
backend/package-lock.json
frontend/package-lock.json
- name: Install root dependencies (Playwright)
shell: bash
run: npm ci
- name: Install backend dependencies
shell: bash
run: npm ci
working-directory: ./backend
- name: Build backend
if: inputs.skip-backend-build != 'true'
shell: bash
run: npm run build
working-directory: ./backend
- name: Install frontend dependencies
shell: bash
run: npm ci
working-directory: ./frontend
- name: Create compose directory and log dir
shell: bash
run: |
mkdir -p ${{ inputs.compose-dir }}
mkdir -p "${{ github.workspace }}/ci-logs"
# Log files live under $GITHUB_WORKSPACE so actions/upload-artifact@v4+ can
# include them alongside repo-relative paths like e2e/report/. Mixing those
# with /tmp paths makes '/' the common root and v4+ strips the absolute
# entries from the artifact. `stdbuf -oL -eL` forces line-buffered output
# so a crash doesn't lose the final few hundred lines to block buffering.
- name: Start backend
shell: bash
run: stdbuf -oL -eL node dist/index.js > "${{ github.workspace }}/ci-logs/backend.log" 2>&1 &
working-directory: ./backend
env:
JWT_SECRET: ${{ inputs.jwt-secret }}
COMPOSE_DIR: ${{ inputs.compose-dir }}
PORT: ${{ inputs.port }}
NODE_ENV: test
- name: Start frontend dev server
shell: bash
run: stdbuf -oL -eL npm run dev > "${{ github.workspace }}/ci-logs/frontend.log" 2>&1 &
working-directory: ./frontend
- name: Wait for services to be ready
shell: bash
run: npx wait-on http://localhost:${{ inputs.port }}/api/health http://localhost:5173 --timeout 30000
# Playwright bundles Chrome for Testing (~170MB) and FFmpeg. Downloading
# them on every E2E run is the single largest cost in this composite:
# observed ~4m15s cold vs ~10s warm when the path is cached. Cache the
# download under a key pinned to the @playwright/test version so a
# future bump invalidates automatically.
- name: Read Playwright version
id: playwright-version
shell: bash
run: |
version=$(node -p "require('./package.json').devDependencies['@playwright/test'].replace(/^[\^~]/, '')")
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.cache/ms-playwright
key: playwright-${{ runner.os }}-${{ steps.playwright-version.outputs.version }}
# OS deps are apt packages under /var, which actions/cache does not
# preserve, so they have to be reinstalled every run regardless of the
# browser cache state. It is fast (~10s).
- name: Install Playwright OS dependencies
shell: bash
run: npx playwright install-deps chromium
- name: Install Playwright browsers
if: steps.playwright-cache.outputs.cache-hit != 'true'
shell: bash
run: npx playwright install chromium