mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-21 17:28:59 -05:00
03350e33a3
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
152 lines
4.1 KiB
YAML
152 lines
4.1 KiB
YAML
name: "frontend / app"
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "frontend/app/**"
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v6
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.16.1
|
|
run_install: false
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
cache: pnpm
|
|
cache-dependency-path: frontend/app/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
working-directory: frontend/app
|
|
run: pnpm install --frozen-lockfile
|
|
- name: Lint
|
|
working-directory: frontend/app
|
|
run: npm run lint:check
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@v6
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.16.1
|
|
run_install: false
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
cache: pnpm
|
|
cache-dependency-path: frontend/app/pnpm-lock.yaml
|
|
- name: Install dependencies
|
|
working-directory: frontend/app
|
|
run: pnpm install --frozen-lockfile
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Generate docs snippets and examples
|
|
working-directory: frontend/snippets
|
|
run: python3 generate.py
|
|
- name: Build
|
|
working-directory: frontend/app
|
|
run: npm run build
|
|
cypress:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.13"
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.16.1
|
|
run_install: false
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
cache-dependency-path: frontend/app/pnpm-lock.yaml
|
|
|
|
- name: Generate docs snippets and examples
|
|
working-directory: frontend/app
|
|
run: pnpm run docs:gen
|
|
|
|
- name: Start dependencies (postgres, rabbitmq)
|
|
run: docker compose up -d
|
|
|
|
- name: Write E2E env
|
|
run: bash ./hack/ci/write-e2e-env.sh
|
|
|
|
- name: Generate encryption keys
|
|
run: bash ./hack/dev/generate-local-encryption-keys.sh ./hack/dev/encryption-keys
|
|
|
|
- name: Migrate DB
|
|
run: bash ./hack/dev/migrate.sh
|
|
|
|
- name: Seed
|
|
run: SEED_DEVELOPMENT=true bash ./hack/dev/run-go-with-env.sh run ./cmd/hatchet-admin seed-cypress
|
|
|
|
- name: Install frontend deps
|
|
working-directory: frontend/app
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Start API + engine
|
|
run: |
|
|
set -euo pipefail
|
|
bash ./hack/ci/start-api.sh > api.log 2>&1 &
|
|
bash ./hack/ci/start-engine.sh > engine.log 2>&1 &
|
|
bash ./hack/ci/wait-for-http.sh http://127.0.0.1:8733/ready 120
|
|
|
|
- name: Start frontend
|
|
working-directory: frontend/app
|
|
run: |
|
|
set -euo pipefail
|
|
pnpm run dev -- --host app.localtest.me --port 5173 > vite.log 2>&1 &
|
|
bash ../../hack/ci/wait-for-http.sh http://app.localtest.me:5173 120
|
|
|
|
- name: Run Cypress
|
|
working-directory: frontend/app
|
|
env:
|
|
CYPRESS_BASE_URL: http://app.localtest.me:5173
|
|
run: pnpm run e2e:run
|
|
|
|
- name: Upload Cypress artifacts (screenshots/videos)
|
|
if: failure()
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: cypress-artifacts
|
|
if-no-files-found: ignore
|
|
path: |
|
|
frontend/app/cypress/screenshots
|
|
frontend/app/cypress/videos
|
|
|
|
- name: Upload logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: e2e-logs
|
|
if-no-files-found: ignore
|
|
path: |
|
|
api.log
|
|
engine.log
|
|
frontend/app/vite.log
|