chore(deps): bump @prisma/client from 5.7.1 to 5.8.0 #390
Workflow file for this run
This file contains 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: | |
pull_request: | |
types: [opened, synchronize] | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
ci: | |
if: github.event_name == 'pull_request' | |
name: CI | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Set node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Install Vercel | |
run: pnpm install -g vercel | |
- name: Get preview environment variables | |
run: vercel env pull .env --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Lint | |
run: pnpm lint | |
- name: Typecheck | |
run: pnpm type-check | |
- name: Unit test | |
run: pnpm test:unit --coverage | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
- name: Build app | |
run: pnpm build | |
- name: Install playwright | |
run: pnpm playwright install --with-deps | |
- name: E2E test | |
run: pnpm test:e2e | |
- name: Upload Playwright report | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
- name: Add comment to PR | |
id: loading_comment_to_pr | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
number: ${{ github.event.issue.number }} | |
header: lighthouse | |
message: | | |
Running Lighthouse audit... | |
- name: Audit website with Lighthouse | |
id: lighthouse_audit | |
uses: treosh/lighthouse-ci-action@v10 | |
with: | |
uploadArtifacts: true | |
temporaryPublicStorage: true | |
configPath: '.github/lighthouse.yml' | |
- name: Format lighthouse score | |
id: format_lighthouse_score | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const result = ${{ steps.lighthouse_audit.outputs.manifest }}[2].summary // The 3th run is the latest | |
const links = ${{ steps.lighthouse_audit.outputs.links }} | |
const formatResult = (res) => Math.round((res * 100)) | |
Object.keys(result).forEach(key => result[key] = formatResult(result[key])) | |
const score = res => res >= 90 ? '🟢' : res >= 50 ? '🟠' : '🔴' | |
const comment = [ | |
`⚡️ [Lighthouse report](${Object.values(links)[0]}):`, | |
'| Category | Score |', | |
'| --- | --- |', | |
`| ${score(result.performance)} Performance | ${result.performance} |`, | |
`| ${score(result.accessibility)} Accessibility | ${result.accessibility} |`, | |
`| ${score(result['best-practices'])} Best practices | ${result['best-practices']} |`, | |
`| ${score(result.seo)} SEO | ${result.seo} |`, | |
' ' | |
].join('\n') | |
core.setOutput("comment", comment); | |
- name: Add comment to PR | |
id: comment_to_pr | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
number: ${{ github.event.issue.number }} | |
header: lighthouse | |
message: | | |
${{ steps.format_lighthouse_score.outputs.comment }} |