chore: update .github/README.md to enhance clarity and organization #10
This file contains hidden or 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: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x, 20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm run install:all | |
- name: Lint code | |
run: | | |
if [ -f "package.json" ] && grep -q "lint" package.json; then | |
npm run lint | |
else | |
echo "No lint script found, skipping..." | |
fi | |
- name: Run tests | |
run: | | |
if [ -f "package.json" ] && grep -q "test" package.json; then | |
npm test | |
else | |
echo "No test script found, skipping..." | |
fi | |
- name: Build extension | |
run: npm run build:extension | |
- name: Build GitHub Pages | |
run: npm run build:pages | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm run install:all | |
- name: Run security audit | |
run: | | |
npm audit --audit-level moderate | |
cd backend && npm audit --audit-level moderate |