Skip to content

πŸ“ enhance CommitList tests for input handling and error display; refa… #39

πŸ“ enhance CommitList tests for input handling and error display; refa…

πŸ“ enhance CommitList tests for input handling and error display; refa… #39

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: πŸ› οΈ Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: πŸ”„ Clear Cache
run: npm run clean
- name: πŸ”„ Ensure package-lock.json is up-to-date
run: npm install --package-lock-only --ignore-scripts --legacy-peer-deps
- name: πŸ“¦ Install dependencies
run: npm ci --legacy-peer-deps
- name: 🐢 Set up Husky
run: npx husky install
- name: πŸ–‹οΈ Format code
run: npm run format
- name: 🧹 Lint code
run: npm run lint
- name: πŸ“ Generate test files
run: npm run generate-tests
- name: πŸ–‹οΈ Format generated test files
run: npm run format
- name: πŸ”¨ Build
run: npm run build
- name: πŸ§ͺ Test with coverage
run: npm run test
- name: πŸ“€ Commit and push generated test files
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if ls src/**/*.test.tsx 1> /dev/null 2>&1; then
git add -A src/**/*.test.tsx # Include untracked files
git commit -m 'πŸ€– Generated unit tests'
git push || echo "No changes to push."
else
echo "No test files to commit. Skipping this step."
fi
shell: /usr/bin/bash -e {0}
# Deploy build to GitHub Pages
- name: πŸš€ Deploy dist to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
publish_branch: gh-pages