Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardised method for executing CI checks on local machine #2

Open
tranhl opened this issue Mar 27, 2024 · 1 comment
Open

Standardised method for executing CI checks on local machine #2

tranhl opened this issue Mar 27, 2024 · 1 comment

Comments

@tranhl
Copy link
Collaborator

tranhl commented Mar 27, 2024

There isn't a standardised method for executing CI checks (e.g. tests, linters, etc) from the local machine for this project yet. Setting this up will allow contributors to get faster & more immediate feedback on potential issues with their PRs, which will help reduce friction to the overall contribution process.

@tranhl tranhl mentioned this issue Mar 27, 2024
@kevgo
Copy link
Contributor

kevgo commented Mar 27, 2024

A possible setup matching the current CI tasks:

  • npm run lint:dist checks dist/index.js
  • npm run lint:eslint already exists
  • npm run lint:ec already exists as well
  • npm run lint is a new task that runs all three lint tasks. It's implemented like this: run run lint:dist && npm run lint:eslint && npm run lint:ec

This is pretty straightforward and could be all we need here. Some npm plugins make this even easier:

  • npm-run-all automatically runs all tasks that start with lint:

    "scripts": {
      // existing scripts here ...
      "lint": "npm-run-all lint:*",
  • concurrently executes the three tasks concurrently, for extra snappiness

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants