Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(ci): run unit tests on all active node versions #12513

Merged
merged 2 commits into from
May 19, 2021
Merged

Conversation

brendankenny
Copy link
Member

As we continue to support the wide LTS -> current Node version spread, we need to make sure we aren't broken on latest while still maintaining support for Node 12 (e.g. ICU support differs significantly between Node 12 and 13+ as in #12426, nolanlawson/marky#18 had lighthouse-logger broken in Node 16, etc). We could maybe consider smoke test support across versions in the future, but running the unit tests across versions was an easy and decent first step.

The unit ci jobs were getting unwieldy enough that it was worth splitting it out into another workflow file 🤷

@brendankenny brendankenny requested a review from a team as a code owner May 19, 2021 00:33
@brendankenny brendankenny requested review from adamraine and removed request for a team May 19, 2021 00:33
@google-cla google-cla bot added the cla: yes label May 19, 2021
runs-on: ubuntu-latest
name: node ${{ matrix.node }}
env:
LATEST_NODE: '16'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT it's not possible to refer to the matrix.node full array in steps nor env variables inside matrix (even with fancy fromJSON stuff), so this was the best I could do to make a way to keep the conditionals on latest node easy to keep up to date.

unit:
strategy:
matrix:
node: ['12', '14', '16']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just run on ['12', '16']? Not sure if there's a lot of downside to running on all three besides more jobs queued up and more chances for flakes

- run: sudo apt-get install xvfb

- name: yarn unit
if: ${{ matrix.node != env.LATEST_NODE }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only running coverage on latest node means better coverage (since it'll have the latest v8 coverage updates) and saves ~3 minutes on the unit run for those not doing coverage

flags: unit
file: ./unit-coverage.lcov

# For windows, just test the potentially platform-specific code.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the existing unit-windows is different enough from the full unit jobs that it's worth just keeping it separate instead of another dimension in the matrix

@@ -19,6 +19,7 @@ describe('locales', () => {
in: 'id',
iw: 'he',
mo: 'ro',
tl: 'fil',
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in node 16, the updated ICU version gives 'fil' for Intl.getCanonicalLocales('tl') (as anticipated), so need to add it here.

@adamraine
Copy link
Member

Should we retire the 💡🏠 now?

@patrickhulce
Copy link
Collaborator

Should we retire the 💡🏠 now?

We're already breaking the required checks list forcing a rebase when this lands, so I'd say if we're going to do it let's do it now :)

@brendankenny
Copy link
Member Author

Should we retire the 💡🏠 now?

We're already breaking the required checks list forcing a rebase when this lands, so I'd say if we're going to do it let's do it now :)

the workflow name surprisingly doesn't matter for selecting the required status checks, but I can also change 💡🏠 now anyways :)

@brendankenny
Copy link
Member Author

ok, we settled on CI

@brendankenny brendankenny merged commit bdff2b7 into master May 19, 2021
@brendankenny brendankenny deleted the unityml branch May 19, 2021 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants