Skip to content

build(deps): bump the framework group across 1 directory with 4 updates #2475

build(deps): bump the framework group across 1 directory with 4 updates

build(deps): bump the framework group across 1 directory with 4 updates #2475

Workflow file for this run

name: Build, lint and Test
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
permissions:
contents: read
jobs:
build:
if: github.repository == 'jerensl/www.jerenslensun.com'
name: Build static web app
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_IMAGES_CDN: 'https://ik.imagekit.io/jerensl'
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js 18.x
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install locked dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build web application
run: pnpm run build
- name: Save PR number
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/number
- name: Upload web app build
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: web-app-build
path: |
out
pr/number
retention-days: 14
lint:
if: github.repository == 'jerensl/www.jerenslensun.com'
name: ESLint
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js 18.x
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install locked dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Lint files
run: pnpm run lint
env:
CI: true
type-check:
if: github.repository == 'jerensl/www.jerenslensun.com'
name: Type check
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js 18.x
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install locked dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Perform type checking
run: pnpm run type-check
env:
CI: true
test:
if: github.repository == 'jerensl/www.jerenslensun.com'
name: Unit and integration tests
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
- name: Setup Node.js 18.x
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: '18.x'
cache: 'pnpm'
- name: Install locked dependencies
run: pnpm install --frozen-lockfile --prefer-offline
- name: Check Code Coverage
run: pnpm run test:coverage
- name: Upload code coverage to artifact
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: jest-code-coverage
path: coverage
retention-days: 14
azure_deploy_staging:
if: github.repository == 'jerensl/www.jerenslensun.com'
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: write # for Azure/static-web-apps-deploy to comment on PRs
uses: ./.github/workflows/azure.yml
secrets: inherit
lhci:
if: >
github.repository == 'jerensl/www.jerenslensun.com' &&
contains(github.event.pull_request.labels.*.name, 'need-perf-check')
needs: azure_deploy_staging
uses: ./.github/workflows/lighthouse.yml
secrets: inherit
with:
static_web_url: ${{ needs.azure_deploy_staging.outputs.static_web_app_url }}