scratchfoundation / scratch-gui

Graphical User Interface for creating and running Scratch 3.0 projects.
https://scratchfoundation.github.io/scratch-gui/develop/
BSD 3-Clause "New" or "Revised" License
4.49k stars 3.59k forks source link

Upgrade CI flow to recent NodeJS #8034

Open matschaffer opened 2 years ago

matschaffer commented 2 years ago

Follow up from https://github.com/LLK/scratch-gui/issues/8000

The tests running on node 10 https://github.com/LLK/scratch-gui/blob/develop/.circleci/config.yml#L43 which hit EOL last year and security EOL 9 months ago (endoflife.date/nodejs).

This doesn't impact the deployability of the app since it eventually just runs in the browser but I think it impacts ease of code contribution.

Some factors to consider:

By upgrading the CI/deployment flow to use a recent NodeJS we should eliminate most of that friction and we'll have to fix the test compatibility in the process.

Latest passing PR (node 16, chrome 99): https://github.com/LLK/scratch-gui/pull/8120

matschaffer commented 2 years ago

In working on this today I noticed that we're also using a legacy image from circleci.

The circleci/node:16-browsers image still packs an older chrome

❯ docker run --rm --entrypoint /opt/google/chrome/chrome circleci/node:16-browsers --version
Google Chrome 96.0.4664.110 unknown

To get to chrome 99 (so we can allow people to more easily test on their own workstations) I think we'll probably have to update the workflow to use https://circleci.com/developer/images/image/cimg/node and https://circleci.com/developer/orbs/orb/circleci/browser-tools which allows you to specify browser versions.

matschaffer commented 2 years ago

@BryceLTaylor so what I did with the PRs above was go from node 10 to node 16 step-wise through each LTS release (12, 14, 16). This kept the set of changes for each step minimal and gave you the option to merge partway while I was still working.

https://github.com/LLK/scratch-gui/pull/8120 should be the last one in the series since it gets circleci onto the latest LTS node (16.14) & chromedriver (99).

It addresses all the bullet points I put in the description of this issue so it should be the last one. There are still a number of deprecation messages around, but I think we can leave that to future PRs.

I can now run the integration tests on my laptop without any trouble which is awesome. 😄

Let me know if I can answer any questions or help with other things! 🧡