Skip to content

Bump typescript-eslint from 8.20.0 to 8.22.0 #63

Bump typescript-eslint from 8.20.0 to 8.22.0

Bump typescript-eslint from 8.20.0 to 8.22.0 #63

Workflow file for this run

name: Continuous Integration
on:
push:
pull_request:
permissions:
contents: read
security-events: write
jobs:
check:
name: Run checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: "9"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check
run: pnpm run check
lint:
name: Run linter
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: "9"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint and save results
run: pnpm run lint -f @microsoft/eslint-formatter-sarif -o /tmp/lint.sarif
continue-on-error: true
- name: Upload lint results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: /tmp/lint.sarif
wait-for-processing: true
- name: Lint
run: pnpm run lint
deploy:
name: Deploy to Cloudflare Workers and test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
with:
version: "9"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- id: deploy
name: Deploy to Cloudflare Workers
uses: cloudflare/wrangler-action@7a5f8bbdfeedcde38e6777a50fe685f89259d4ca # v3.13.1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
command: versions upload
- name: Parse the URL of the deployed version
env:
CMD_OUTPUT: ${{ steps.deploy.outputs.command-output }}
run: echo "DEPLOYED_URL=$(echo $CMD_OUTPUT | grep -o 'https://[^ ]*')" >> $GITHUB_ENV
- name: Test the deployed version
run: |
curl -s $DEPLOYED_URL > /tmp/deployed.html
curl -s https://mikanani.me > /tmp/expected.html
total_lines=$(wc -l < /tmp/expected.html)
diff_lines=$(diff /tmp/expected.html /tmp/deployed.html | grep -c "^[<>]")
diff_percentage=$(echo "scale=2; $diff_lines * 100 / $total_lines" | bc)
if (( $(echo "$diff_percentage > 5" | bc -l) )); then
echo "Difference is too large: $diff_percentage%"
exit 1
else
echo "Difference is acceptable: $diff_percentage%"
fi