Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.12 KB

File metadata and controls

38 lines (29 loc) · 1.12 KB

JavaScript Workflows

The JavaScript workflows detect npm, yarn, and pnpm from lockfiles and use matching dependency caches.

If no JavaScript lockfile exists, workflows fail by default instead of running npm install. Prefer committing a lockfile. Use allow_unpinned_node_install: true only for trusted compatibility callers.

Static Analysis

jobs:
  static-analysis:
    uses: sympress/workflows/.github/workflows/javascript-static-analysis.yml@v1
    with:
      working_directory: packages/example
      script: typecheck

If the configured script is missing, the workflow runs tsc --noEmit when TypeScript is installed. Custom command values require allow_custom_command: true.

Unit Tests

jobs:
  unit-js:
    uses: sympress/workflows/.github/workflows/javascript-unit.yml@v1
    with:
      script: test

If the configured script is missing, the workflow runs Jest when it is installed. Custom command values require allow_custom_command: true.

Coverage is uploaded to Codecov when CODECOV_TOKEN is provided and codecov_upload is enabled. The default coverage file is coverage/lcov.info.