Skip to content

chore: remove outdated root vitest config #35

chore: remove outdated root vitest config

chore: remove outdated root vitest config #35

// Yoni: This file should be part of example app

Check failure on line 1 in .github/workflows/collect-test-data.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/collect-test-data.yml

Invalid workflow file

(Line: 1, Col: 1): Unexpected value '// Yoni'
name: Collect Test Data
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
test-and-collect:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
working-directory: apps/example-app
run: pnpm test:ci || true
- name: Parse JUnit to JSON
working-directory: apps/example-app
env:
PR_NUMBER: ${{ github.event.pull_request.number || '0' }}
GITHUB_SHA: ${{ github.sha }}
run: pnpm parse-junit test-results.xml test-data.json
- name: Commit to data branch
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Fetch or create data branch
git fetch origin gh-data || true
git checkout gh-data || git checkout --orphan gh-data
# Clean and copy data
mkdir -p data
cp apps/example-app/test-data.json "data/$(date +%Y-%m-%d)_${GITHUB_SHA:0:7}.json"
# Create index.json with list of all files
ls data/*.json | sed 's|data/||' | jq -R -s 'split("\n") | map(select(length > 0))' > data/index.json
# Commit and push
git add data/
git commit -m "Add test data for ${GITHUB_SHA:0:7}" || echo "No changes"
git push origin gh-data