openedx / openedx/credentials

Running Karma tests in CI

Open
#1,871 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
Python
Stars
25
Forks
83
Avg merge
11h 51m
Merged PRs (30d)
1

Description

After the Node 16 upgrade our non-React JS tests stopped working during CI. After some research, we were made aware that this may be an issue with Firefox not being captured correctly running in a GitHub/GitHub Actions + Karma + Node 16 environment (see https://github.com/karma-runner/karma-firefox-launcher/issues/245).

When we discovered the issue we attempted to move away from Firefox and use a headless version of Chromium instead. We were able to get this working in CI, but ran into issues locally when installing a new dependency (puppeteer) used to facilitate the use of Chromium with Karma.

Currently, we have a method of running the tests locally that we do manually during development. Ideally, we'd like to get these tests working in CI again.

Potential Options:

  • We might be able to get Chromium working using puppeteer-core
  • Other options like Chrome/PhantomJS/etc as a headless browser

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the GitHub Actions and Karma configuration for the non-React JavaScript tests, then reproduce the Node 16 browser-launch failure and compare the Firefox and Chromium/puppeteer approaches described. Done means the tests run successfully in CI while the existing local development workflow remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript, node.js
Domain
ci-cd, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.