Skip to content

Commit 1bd48b0

Browse files
committed
Update CI workflow: permissions, test steps, and Playwright
Adds explicit permissions for contents and pull-requests. Simplifies test steps by removing individual test commands in favor of a single coverage run. Limits Playwright browser install to Chromium only. Updates build step comments and references for clarity.
1 parent 650fc49 commit 1bd48b0

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [main]
88

9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
913
jobs:
1014
test:
1115
name: Unit & Integration Tests
@@ -27,21 +31,8 @@ jobs:
2731
- name: Run linter
2832
run: npm run lint
2933

30-
- name: Run baseline tests
31-
run: npm run test:baseline
32-
continue-on-error: false
33-
34-
- name: Run unit tests (if they exist)
35-
run: npm test -- run unit || echo "No unit tests found yet"
36-
continue-on-error: true
37-
38-
- name: Run integration tests (if they exist)
39-
run: npm run test:integration || echo "No integration tests found yet"
40-
continue-on-error: true
41-
4234
- name: Run all tests with coverage
43-
run: npm run test:coverage -- run || echo "Tests passed with warnings"
44-
continue-on-error: false
35+
run: npm run test:coverage
4536

4637
- name: Upload coverage to Codecov
4738
uses: codecov/codecov-action@v4
@@ -78,7 +69,7 @@ jobs:
7869
run: npm ci
7970

8071
- name: Install Playwright browsers
81-
run: npx playwright install --with-deps chromium firefox webkit
72+
run: npx playwright install --with-deps chromium
8273

8374
- name: Run E2E tests
8475
run: npm run test:e2e
@@ -164,10 +155,11 @@ jobs:
164155
run: npm ci
165156

166157
- name: Build production bundle
167-
# PHASE 0 TEMPORARY: Disable treating warnings as errors
158+
# TODO: Remove CI=false after fixing ESLint warnings (target: Phase 3)
168159
# Create React App treats warnings as errors when CI=true
169-
# Re-enable in Phase 3 (Code Quality & Refactoring) by removing CI=false
170-
# Known warnings: unused variables in App.js, ArrayUpdateMenu.jsx, ListElement.jsx
160+
# Known warnings: unused variables in App.js (lines 119, 122, 596, 618, 2852)
161+
# unused variables in ArrayUpdateMenu.jsx (line 13)
162+
# Issue: https://github.com/LorenFrankLab/rec_to_nwb_yaml_creator/issues/[TBD]
171163
run: CI=false npm run build
172164

173165
- name: Upload build artifacts

0 commit comments

Comments
 (0)