ChromaticHQ / calliope

An opinionated yet extensible toolset to handle common front-end tasks
3 stars 0 forks source link

GH-16 Run unit tests in Windows #17

Closed agarzola closed 2 years ago

agarzola commented 2 years ago

Description

This PR adds support and configuration for running tests in Windows.

Motivation / Context

Working on a Calliope-powered project from Windows should be as reliable and well-supported as any other platform. In order to increase our confidence that any changes and future features are implemented in a way that does not break existing expectations, we should run our tests in Windows as well as *nix systems. This PR ensures that tests are run in both Windows and Ubuntu, and also applies some changes to our tests to enable Windows to run our tests.

Close GH-16.

Testing Instructions / How This Has Been Tested

All checks should pass. @alexandar87 and I hopped on a call to troubleshoot the issues we were seeing in Windows. Once we realized what was going on and fixed it, we pushed up that change, then intentionally broke a test to confirm that expectations that are not met correctly result in failed tests. I have reproduced that failing condition and the result can be reviewed in this failed check for intentionally-broken commit 35867b1. (I have since reverted this commit.)

Screenshots

image

Documentation

I added comments explaining any gnarly bits.

alexandar87 commented 2 years ago

@agarzola this morning I have gone through painful setup everything on Windows 10 and I have Calliope up and running. Can you share we me some steps that I need to do in order to test this?

agarzola commented 2 years ago

@alexandar87 Yes! Thank you for reaching out, Alex! Happy to hop on a call/huddle, but running yarn test should run tests for you and I expect those tests to fail in one way or another. So far, as you can tell from the Windows-related checks on this PR, the issue we’re seeing is that tests seem to hang indefinitely until the GH Action times out after ~15 minutes. I wonder if running tests locally would clue us in to what is causing this?

We need to troubleshoot whatever errors you find, figure out the root cause, and determine next steps.

alexandar87 commented 2 years ago

@agarzola sure I don't really have other tasks, so whenever you can we can do a huddle.