[go] migrate LaTeX -> go-typst #1174
Workflow file for this run
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: 馃寪 Web CI | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| checks: write | |
| issues: write | |
| on: | |
| # Run on PRs that change web files | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| paths: | |
| - "web/**" | |
| - ".github/workflows/web-ci.yml" | |
| - ".github/actions/setup-node-pnpm/**" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| # Run on push to main to update coverage badges | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "web/**" | |
| - ".github/workflows/web-ci.yml" | |
| - ".github/actions/setup-node-pnpm/**" | |
| - "package.json" | |
| - "pnpm-lock.yaml" | |
| jobs: | |
| lint: | |
| name: "馃攳 Lint (advisory)" | |
| runs-on: ubuntu-latest | |
| continue-on-error: true # Advisory - allows PR to merge even if linting fails | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js with pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| working-directory: web | |
| - name: Run Prettier & ESLint | |
| run: pnpm run lint | |
| test: | |
| name: "馃И Test" | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js with pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| working-directory: web | |
| - name: Run Jest tests with coverage | |
| run: pnpm run test:ci | |
| - name: Upload Web coverage to Codecov | |
| uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.3.2 | |
| with: | |
| files: ./web/coverage/lcov.info | |
| flags: web | |
| name: web-coverage | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Coverage comment | |
| uses: romeovs/lcov-reporter-action@dda1c9b1fa1622b225e9acd87a248751dbcc6ada # v0.3.1 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| lcov-file: ./web/coverage/lcov.info | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| delete-old-comments: true | |
| - name: Coverage summary | |
| run: | | |
| echo "## Test Coverage Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| cat coverage/coverage-summary.json | jq -r '.total | to_entries | map("\(.key): \(.value.pct)%") | .[]' >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| build: | |
| name: "馃敤 Build" | |
| runs-on: ubuntu-latest | |
| needs: test | |
| defaults: | |
| run: | |
| working-directory: web | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js with pnpm | |
| uses: ./.github/actions/setup-node-pnpm | |
| with: | |
| working-directory: web | |
| - name: Build production bundle | |
| run: pnpm run build | |
| - name: Build summary | |
| run: | | |
| echo "## 馃敤 Build Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- Output directory: \`build/\`" >> $GITHUB_STEP_SUMMARY | |
| if [ -d "build" ]; then | |
| echo "- Total size: $(du -sh build | cut -f1)" >> $GITHUB_STEP_SUMMARY | |
| echo "- Files generated: $(find build -type f | wc -l)" >> $GITHUB_STEP_SUMMARY | |
| fi |