Page MenuHomePhabricator

Added web tests to .lintstagedrc and CI
ClosedPublic

Authored by bartek on Feb 3 2023, 5:25 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 4:10 PM
Unknown Object (File)
Wed, Sep 25, 7:47 PM
Unknown Object (File)
Fri, Sep 20, 8:10 AM
Unknown Object (File)
Sun, Sep 15, 9:51 AM
Unknown Object (File)
Fri, Sep 6, 1:25 PM
Unknown Object (File)
Aug 29 2024, 10:38 AM
Unknown Object (File)
Aug 29 2024, 10:38 AM
Unknown Object (File)
Aug 29 2024, 10:38 AM

Details

Summary

Discussed in https://linear.app/comm/issue/ENG-2712/we-dont-run-tests-in-web-and-native-in-precommit-hook
After the tests are fixed by D7019, they can be added to pre-commit and CI

CI: did what suggested here: https://phab.comm.dev/D7019#208162

Depends on D7019.

Previous description by @przemek:

Title sums up it pretty well. Adding it runs tests in those workspaces during precommit hook.
Right now we don't have any tests in native and desktop yet, but it won't hurt to run them if they are created.
Adding @ashoat as this change important part of CI.

Test Plan
  • Added dummy change that broke tests in the web directory.
  • Ran lint-staged -d -v
  • ensured that it fails
  • Fixed the issue and checked lint-staged again

Buildkite is tested by this diff

Did not test GH action

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ashoat requested changes to this revision.Feb 3 2023, 11:13 AM

Test plan was insufficient... you either need to read more closely to test more thoroughly

(Please don't iterate on this diff until you've landed native typeahead)

.lintstagedrc.js
55 ↗(On Diff #21941)

Did you test this? I don't see a test script in desktop/package.json... I suspect this will prevent any commits against desktop by causing errors in lint-staged

This revision now requires changes to proceed.Feb 3 2023, 11:13 AM
.lintstagedrc.js
55 ↗(On Diff #21941)

Even yarn jest will fail without --passWithNoTests flag

bartek planned changes to this revision.
bartek added a reviewer: przemek.
bartek added reviewers: michal, kamil. bartek added 1 blocking reviewer(s): atul.
bartek removed a reviewer: przemek.
bartek retitled this revision from Added web, native and desktop tests to .lintstagedrc to Added web tests to .lintstagedrc and CI.Mar 9 2023, 10:38 AM
bartek edited the summary of this revision. (Show Details)
bartek edited the test plan for this revision. (Show Details)
bartek added a subscriber: przemek.
bartek edited the summary of this revision. (Show Details)
  • Updated diff description
  • Added CI
  • Removed lint-staged for desktop and native > On native we have only one dummy test which is failing
This revision is now accepted and ready to land.Mar 9 2023, 11:44 AM
This revision was automatically updated to reflect the committed changes.