Add harness workflow and Material showcase design system
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
name: Harness Validate
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
harness-validate:
|
||||
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10.25.0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Determine harness diff range
|
||||
id: range
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
if [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
|
||||
echo "from=${{ github.event.pull_request.base.sha }}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "from=${{ github.event.before }}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
echo "to=${GITHUB_SHA}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Show selected harness suites
|
||||
run: pnpm harness:select -- --from "${{ steps.range.outputs.from }}" --to "${{ steps.range.outputs.to }}"
|
||||
|
||||
- name: Run changed harness suites on pull requests
|
||||
if: github.event_name == 'pull_request'
|
||||
run: pnpm harness:validate:changed -- --from "${{ steps.range.outputs.from }}" --to "${{ steps.range.outputs.to }}"
|
||||
|
||||
- name: Run PR harness suite on main
|
||||
if: github.event_name == 'push'
|
||||
run: pnpm harness:validate:pr
|
||||
Reference in New Issue
Block a user