Added hover effect #129
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: PR Check | |
on: | |
pull_request: | |
types: [opened, edited, reopened] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
# Step 2: Set up Node.js (or other environments as needed) | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: npm install | |
# Step 4: Linting code (optional but recommended) | |
- name: Lint code | |
run: npm run lint # Customize with your lint command | |
# Step 5: Run security checks (using npm audit) | |
- name: Run security audit | |
run: npm audit --audit-level=high | |
# Step 6: Check for vulnerabilities (Snyk or similar service) | |
- name: Run Snyk vulnerability check | |
uses: snyk/actions/node@master | |
with: | |
command: monitor # Or test for scanning vulnerabilities | |
# Step 7: Static analysis or code quality check (ESLint, Prettier, etc.) | |
- name: Run static code analysis | |
run: npm run lint # Example: ESLint or Prettier for JS | |
# Step 8: Run tests (unit tests, integration tests, etc.) | |
- name: Run unit tests | |
run: npm test | |
# Step 9: Check for test coverage (code coverage) | |
- name: Check code coverage | |
run: npm run coverage # Customize with your test coverage command | |
# Step 10: Check commit message format (if applicable) | |
- name: Validate commit message format | |
run: | | |
git log -1 --pretty=%B | grep -Eq '^feat|fix|docs|style|refactor|perf|test|chore|build|ci|revert' | |
# Step 11: Run build (if your project requires a build step) | |
- name: Build project | |
run: npm run build | |
# Step 12: Check for outdated dependencies (optional) | |
- name: Check outdated dependencies | |
run: npm outdated || true # This lists outdated dependencies | |
# Step 13: Verify package size (if necessary for client-side apps) | |
- name: Check bundle size | |
run: npm run size # Customize for your project | |
# Step 14: End-to-end testing (Cypress or similar tool) | |
- name: Run end-to-end tests | |
run: npm run e2e # Customize with your E2E test command | |
# Step 15: Post PR check status notification | |
- name: Notify on success | |
if: success() | |
run: echo "PR checks passed successfully." | |
# Step 16: Notify on failure | |
- name: Notify on failure | |
if: failure() | |
run: echo "PR checks failed." |