| applyTo |
|---|
.github/workflows/*.yaml |
- Use
npmas the package manager - Use
actions/setup-node@v6withnode-version-file: ".nvmrc"
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: ".nvmrc"
- run: npm ci- Linux tests require Xvfb for display:
/usr/bin/Xvfb :99 -screen 0 1024x768x24 - Set
DISPLAY: ":99.0"environment variable for tests on Linux - Tests run via
npm test - Include
pnpm/action-setup@v4in test jobs - some test fixtures usepackageManager: pnpmto verify pnpm compatibility
- Use minimal required permissions for each job
- Common permissions:
issues: write,pull-requests: write,contents: read
- For
actions/github-script@v7, only use built-in Node.js modules (fs, path, etc.) - Do not use external npm packages like
js-yamlin github-script (they are not available) - Use JSON format for config files that need to be read in workflows