151d776842
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
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: Run selected harness suites
|
|
run: pnpm harness:validate:changed -- --from "${{ steps.range.outputs.from }}" --to "${{ steps.range.outputs.to }}"
|
|
|
|
- name: Upload harness artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: harness-artifacts-${{ github.run_id }}-${{ github.run_attempt }}
|
|
if-no-files-found: ignore
|
|
path: |
|
|
.artifacts/harness
|
|
.artifacts/a11y
|
|
.artifacts/test-results
|
|
retention-days: 7
|