Griffin searchpage #4
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: NEXT Continuous Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Check out the code | |
- name: Check out the repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up Node.js | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
# Step 3: Install dependencies | |
- name: Install dependencies | |
run: npm install | |
# Step 4: Lint the code | |
- name: Run ESLint | |
run: npm run lint | |
# Step 5: Run auto-generated unit tests (e.g., Jest) | |
- name: Run Unit Tests | |
run: npm test | |
# Step 6: Run Playwright auto-generated E2E tests | |
- name: Run Playwright E2E Tests | |
run: | | |
npx playwright install # Install required Playwright browsers | |
npx playwright test | |
# Step 7: Build the application | |
- name: Build the app | |
run: npm run build |