mirror of
https://gitee.com/pnoker/iot-dc3.git
synced 2026-11-03 19:52:27 +08:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.3.1 to 7.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/34e114876b0b11c390a56381ad16ebd13914f8d5...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' 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>
111 lines
2.6 KiB
YAML
111 lines
2.6 KiB
YAML
name: Web CI
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- dc3-web/**
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
paths:
|
|
- dc3-web/**
|
|
workflow_dispatch:
|
|
inputs:
|
|
e2e_base_url:
|
|
description: 'Optional running web environment URL for Playwright e2e'
|
|
required: false
|
|
default: ''
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: web-ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
quality:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: dc3-web
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
|
|
|
|
- name: Set pnpm
|
|
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1
|
|
with:
|
|
package_json_file: dc3-web/package.json
|
|
|
|
- name: Set Node
|
|
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
cache-dependency-path: dc3-web/pnpm-lock.yaml
|
|
|
|
- name: Install
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: pnpm run lint:check
|
|
|
|
- name: Type Check
|
|
run: pnpm run check
|
|
|
|
- name: Guardrails
|
|
run: pnpm run test:guard
|
|
|
|
- name: Test With Coverage
|
|
run: pnpm run test:ci
|
|
|
|
- name: Build
|
|
run: pnpm build
|
|
|
|
e2e:
|
|
if: ${{ github.event_name == 'workflow_dispatch' && inputs.e2e_base_url != '' }}
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: dc3-web
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
|
|
|
|
- name: Set pnpm
|
|
uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1
|
|
with:
|
|
package_json_file: dc3-web/package.json
|
|
|
|
- name: Set Node
|
|
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
cache-dependency-path: dc3-web/pnpm-lock.yaml
|
|
|
|
- name: Install
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Install Playwright
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
|
|
- name: E2E
|
|
run: pnpm run test:e2e
|
|
env:
|
|
E2E_BASE_URL: ${{ inputs.e2e_base_url }}
|
|
E2E_START_SERVER: '0'
|
|
|
|
- name: Upload Playwright Report
|
|
if: always()
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
|
|
with:
|
|
name: playwright-report
|
|
path: |
|
|
dc3-web/playwright-report
|
|
dc3-web/test-results/e2e-results.json
|
|
dc3-web/test-results/e2e-artifacts
|
|
if-no-files-found: ignore
|