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

[support/4.x] Backport: GitHub Actions + Jest fixes for Windows #4006

Merged
merged 7 commits into from
Jul 28, 2023

Conversation

colinrotherham
Copy link
Contributor

@colinrotherham colinrotherham commented Jul 24, 2023

Partially backports #3816 and #3863 for v4.x for Windows test reliability

Note: Changes related to path handling #3756 (v5 only) were excluded

@colinrotherham colinrotherham requested a review from a team as a code owner July 24, 2023 14:43
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4006 July 24, 2023 14:43 Inactive
@colinrotherham colinrotherham changed the title Backport: POSIX paths and GitHub Actions fixes [support/4.x] Backport: POSIX paths and GitHub Actions fixes Jul 24, 2023
@colinrotherham colinrotherham changed the title [support/4.x] Backport: POSIX paths and GitHub Actions fixes [support/4.x] Backport: GitHub Actions fixes for Windows Jul 24, 2023
@colinrotherham colinrotherham force-pushed the backport-fix-helpers-windows branch from f8a74d0 to afc81a9 Compare July 24, 2023 14:54
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4006 July 24, 2023 14:54 Inactive
@colinrotherham colinrotherham changed the title [support/4.x] Backport: GitHub Actions fixes for Windows [support/4.x] Backport: GitHub Actions + Jest fixes for Windows Jul 24, 2023
@colinrotherham colinrotherham force-pushed the backport-fix-url-windows branch from 63afd26 to a68403e Compare July 24, 2023 15:49
@colinrotherham colinrotherham changed the base branch from backport-fix-url-windows to support/4.x July 24, 2023 15:51
@colinrotherham colinrotherham force-pushed the backport-fix-helpers-windows branch from afc81a9 to c49196d Compare July 24, 2023 15:52
@colinrotherham colinrotherham changed the base branch from support/4.x to backport-fix-url-windows July 24, 2023 15:52
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4006 July 24, 2023 15:52 Inactive
We see failures due to Express.js startup delays, awaiting selector visibility, and accessibility tests taking 60+ seconds to loop through all component examples
(cherry picked from commit 6106aa0)
Required for `workflow_call` calls but still works with `workflow_dispatch`
(cherry picked from commit d2fdf07)
We previously let these Jest projects run early:

1. JavaScript unit tests
2. Nunjucks macro tests

But they both finish sooner than the “Accessibility tests” project
(cherry picked from commit 6ef1864)
@colinrotherham colinrotherham force-pushed the backport-fix-url-windows branch from a68403e to 02d498d Compare July 24, 2023 16:41
@colinrotherham colinrotherham force-pushed the backport-fix-helpers-windows branch from c49196d to 7c85d71 Compare July 24, 2023 16:41
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4006 July 24, 2023 16:41 Inactive
All the cache keys have also been changed to ensure all archives are recreated
(cherry picked from commit ea9eb03)
Unlike on Linux, tests run slower when concurrent due to the number of open Chrome windows/tabs
(cherry picked from commit 87e4b2c)
We already skip package tests as we have coverage in our PR tests already
(cherry picked from commit 02f1c68)
@colinrotherham colinrotherham force-pushed the backport-fix-helpers-windows branch from 7c85d71 to f4c451c Compare July 24, 2023 17:02
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4006 July 24, 2023 17:02 Inactive
Base automatically changed from backport-fix-url-windows to support/4.x July 25, 2023 09:07
@36degrees
Copy link
Contributor

The only thing I'm not 100% sure about is pinning to exact GitHub versions…

Dependabot will (as currently configured) only raise PRs to bump GitHub Action workflows on the main branch. So unless we change Dependabot's config or manually backport changes when they're raised on main we'll be stuck on the versions we pin to for the foreseeable on this branch.

Equally that might be desired – it's unlikely there'll be much activity on this branch post v5, but we want to keep it releasable. So pinning to specific versions might actually help with that.

Thoughts?

@domoscargin
Copy link
Contributor

domoscargin commented Jul 26, 2023

Equally, pinning leaves us vulnerable to uncaught security warnings when main gets more and more out of sync with the v4 branch, so could end up releasing something dangerous.

I think it probably makes sense to pin everything, then configure security bumps for the branch? Security fixes are pretty much what we're committing to anyway.

@colinrotherham
Copy link
Contributor Author

Great minds! I had the exact same thoughts but kept it solely for stability

For example, when releasing v4.8.0 we know what worked 3 months ago still works now, avoiding any surprise GitHub Action updates that slipped in a breaking change whilst we were busy on v5

Could look into Dependabot target-branch and update support/4.x too?

@colinrotherham
Copy link
Contributor Author

Sorry @domoscargin I missed your reply whilst typing

@36degrees
Copy link
Contributor

I think it probably makes sense to pin everything, then configure security bumps for the branch? Security fixes are pretty much what we're committing to anyway.

Unfortunately, as far as I can tell, Dependabot doesn't support security updates against multiple branches 😞

@colinrotherham colinrotherham force-pushed the backport-fix-helpers-windows branch from f4c451c to 012c3e6 Compare July 27, 2023 08:29
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-4006 July 27, 2023 08:29 Inactive
@colinrotherham
Copy link
Contributor Author

So we can discuss further + unblock, I've split out the commits that pin GitHub Actions versions:

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Backport looks fine, let's merge it ⛵

@colinrotherham colinrotherham merged commit 7ca5c20 into support/4.x Jul 28, 2023
@colinrotherham colinrotherham deleted the backport-fix-helpers-windows branch July 28, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

5 participants