feat: add Partners & Sponsors page #767
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Detect package manager | |
| id: pm | |
| run: | | |
| if [ -f pnpm-lock.yaml ] || node -e "try{const s=Object.values(require('./package.json').scripts||{}).join(' '); process.exit(s.includes('pnpm')?0:1)}catch(e){process.exit(1)}"; then | |
| echo "pm=pnpm" >> $GITHUB_OUTPUT | |
| else | |
| echo "pm=npm" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Enable corepack (use packageManager version) | |
| if: steps.pm.outputs.pm == 'pnpm' | |
| run: corepack enable | |
| - name: Install | |
| run: | | |
| if [ "${{ steps.pm.outputs.pm }}" = "pnpm" ]; then | |
| pnpm install --no-frozen-lockfile | |
| elif [ -f package-lock.json ]; then | |
| npm ci | |
| else | |
| npm install | |
| fi | |
| - name: Lint | |
| run: | | |
| if [ "${{ steps.pm.outputs.pm }}" = "pnpm" ]; then | |
| pnpm run lint || echo "No lint script; skipping" | |
| else | |
| npm run lint --if-present | |
| fi | |
| - name: Test | |
| run: | | |
| if [ "${{ steps.pm.outputs.pm }}" = "pnpm" ]; then | |
| pnpm run test || echo "No test script; skipping" | |
| else | |
| npm test --if-present | |
| fi | |
| - name: Coverage (Vitest, 60% lines minimum) | |
| run: | | |
| if [ -f vitest.config.ts ] || [ -f vitest.config.js ]; then | |
| if [ "${{ steps.pm.outputs.pm }}" = "pnpm" ]; then | |
| pnpm exec vitest run --coverage | |
| else | |
| npx vitest run --coverage | |
| fi | |
| else | |
| echo "No vitest config found; skipping coverage check." | |
| fi | |