arifszn/gitprofile

View on GitHub
.github/workflows/test-deploy.yml

Summary

Maintainability
Test Coverage
name: Test Deployment

on:
  pull_request:
    branches: [main]

jobs:
  test-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Node
        uses: actions/setup-node@v4
        with:
          node-version: 20.x
          cache: 'npm'

      - name: Restore cache
        uses: actions/cache@v4
        with:
          path: |
            **/node_modules
          key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

      - name: Install dependencies
        run: npm ci

      - name: Run lint
        run: npm run lint

      - name: Run prettier
        run: npm run prettier

      - name: Build
        run: npm run build
        env:
          CI: ''