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)
Sat, Nov 2, 2:53 AM
Unknown Object (File)
Sat, Nov 2, 12:29 AM
Unknown Object (File)
Sat, Nov 2, 12:29 AM
Unknown Object (File)
Sat, Nov 2, 12:29 AM
Unknown Object (File)
Sat, Oct 26, 12:19 AM
Unknown Object (File)
Oct 7 2024, 5:31 PM
Unknown Object (File)
Sep 26 2024, 4:10 PM
Unknown Object (File)
Sep 25 2024, 7:47 PM

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.