这是indexloc提供的服务,不要输入任何密码
Skip to content

Add JS & CSS lint actions on PRs #51

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

Merged
merged 8 commits into from
May 6, 2022
Merged

Add JS & CSS lint actions on PRs #51

merged 8 commits into from
May 6, 2022

Conversation

RahiDroid
Copy link
Member

Description

Adds JS & CSS lint checks on PRs

Technical Details

Checklist

Screenshots

To-do

Fixes/Covers issue

Fixes #

@RahiDroid RahiDroid requested a review from thelovekesh April 26, 2022 10:33
@RahiDroid RahiDroid self-assigned this Apr 26, 2022
Copy link
Member

@thelovekesh thelovekesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few more ideas in mind which can be implemented in this workflow:

  • We can run linting for the package.json using npm run lint:pkg-json, so it's makes sense to add it as well.
  • actions/cache@v3 GHA can be used for node_modules cache.
  • Add concurrency so that previous tests can be canceled if new changes pushed recently.
  • We can specify when to run a workflow on PR i.e.
  pull_request:
    types:
      - synchronize
      - opened
      - ready_for_review

Should we run this workflow on Node 14 as well?


on:
pull_request:
paths:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to require paths explicitly? We already have specified paths in the npm:lint* commands.

@thelovekesh
Copy link
Member

@RahiDroid Should we include JS tests in this workflow as well?

@RahiDroid
Copy link
Member Author

RahiDroid commented Apr 26, 2022

We can run linting for the package.json using npm run lint:pkg-json, so it's makes sense to add it as well.

Added!

actions/cache@v3 GHA can be used for node_modules cache.

Actions documentation states that, "It is not recommended to cache node_modules, as it can break across Node versions and won’t work with npm ci".

Add concurrency so that previous tests can be canceled if new changes pushed recently.
Added!

We can specify when to run a workflow on PR

Yup, adding ready_for_review makes sense, rest are default. Added!

Should we run this workflow on Node 14 as well

I don't think it's necessary.

@RahiDroid Should we include JS tests in this workflow as well?

Should be part of different workflow but will add in this PR in separate PR.

@RahiDroid RahiDroid merged commit 4bb2d0f into main May 6, 2022
@RahiDroid RahiDroid deleted the feature/workflows branch May 6, 2022 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants