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

Replace Appveyor windows testing with GHA #5599

Merged
merged 51 commits into from
Jul 27, 2024

Conversation

jonchurch
Copy link
Member

@jonchurch jonchurch commented Apr 14, 2024

Edit: Ah, this will take more work than I realized. our current CI uses several cli tools to get its job done. I can make this work, but not in the 15 mins I had when I first opened the PR. I setup nvm-windows to allow us to install node-versions below 6 (which is lowest supported by actions/node-setup as far as I can tell, which would be my preference) but there is still work to be done here. Maybe we want to use actions/setup-node-using-nvm

Currently we test against unbuntu-latest on github actions, and then on windows with appveyor.

I want to remove the appveyor dependency, as it has been hanging and slow, holding up PRs for hours at a time.

This PR adds windows-latest to the CI matrix.

I don't know a better way to test this than via PR, and want to run it in the main repo rather than my fork. Will fixup history on my branch once I have something ready to land.

tasks

  • Run tests on windows-latest
  • Split the Lint step out so it only runs once, not once per node version/platform combo
  • Drop io.js support officially, testing for it isn't worth it, if we support node 4 we support io.js (I want to do this, but eh, if it's not too much work to continue to run CI for io.js I'll keep it in instead. haven't invested much in this)
  • Figure out a fix for the npm install failure under Node 5
  • Remove Appveyor Connection
  • Figure out how we are using codecoverage, where do we report it? (we report it to coveralls, in a CI step, viewable here)
    • Investigate reducing coverage runs (do we really need to run for every version?)
  • Rename the CI from Experimental
  • Replace existing v4 CI
  • Open Issue for v5 CI based on the work here

@jonchurch jonchurch marked this pull request as draft April 14, 2024 08:58
@UlisesGascon UlisesGascon added the semver-ignore This change does not have any impact in semver (docs, tooling, etc..) label Apr 17, 2024
@jonchurch
Copy link
Member Author

Note to self: Remove the lint step that runs for every Node Version, it is redundant as we are static analyzing source code, which will not differ based on the Node version.

@jonchurch
Copy link
Member Author

Woah, ran into this npm/cli#681 on Node 5 here, dunno what the fix is. I guess update npm? Im just using what ships w/ the latest version of Node 5

@jonchurch
Copy link
Member Author

jonchurch commented Apr 20, 2024

Okay, Node 21 seems to have added a new method! QUERY which is awesome, looks to have landed here nodejs/node#51719 in 21.7.2 (changelog)

That's why I have a failing test here on 21, dunno the actual root cause though.

@wesleytodd any idea what needs to be done to router to support QUERY? Or maybe the failure is on Supertest?

To repro it, nvm install 21 && npm t

@jonchurch jonchurch changed the title Add windows-latest to the ci matrix Replace Appveyor windows testing with GHA Apr 20, 2024
@wesleytodd
Copy link
Member

@wesleytodd any idea what needs to be done to router to support QUERY? Or maybe the failure is on Supertest?

Just to close the loop on this, this was sorted out in other channels. It was not yet fixed correctly in core.

@@ -1,6 +1,7 @@
# npm
node_modules
package-lock.json
npm-shrinkwrap.json
Copy link
Member Author

Choose a reason for hiding this comment

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

Note that Im adding shrinkwrap to gitignore, we don't generate it, but we did go out of our way in the CI before to configure node to ignore it

Comfortable removing that config part, and just making sure we never commit it

package.json Show resolved Hide resolved
@jonchurch jonchurch marked this pull request as ready for review July 8, 2024 20:48
if: ${{matrix.npm-version != ''}}
run: npm install -g ${{ matrix.npm-version }}

- name: Configure npm loglevel
Copy link
Member Author

Choose a reason for hiding this comment

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

dropped configuring npm to ignore package-lock and shrinkwrap

We have .npmrc set to package-lock: false, and this same PR updates gitignore to ignore shrinkwrap

Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason not to also move this config into the .npmrc if this is what we need? I do wonder what the reason was to configure this at all in the past, do you know that?

with:
node-version: ${{ matrix.node-version }}

- name: Npm version fixes
Copy link
Member Author

@jonchurch jonchurch Jul 8, 2024

Choose a reason for hiding this comment

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

See the comments in the matrix include section to understand why I added a step to install npm for a few versions

.github/workflows/ci.yml Outdated Show resolved Hide resolved
Copy link
Member

@blakeembrey blakeembrey left a comment

Choose a reason for hiding this comment

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

LGTM, one nice change would be to remove the dev dependencies that are used only in examples/ such as connect-redis so we don't need to uninstall in tests (add a new package.json in the examples instead).

@jonchurch
Copy link
Member Author

jonchurch commented Jul 9, 2024

@blakeembrey, it's a good idea. I just did that blindly and then realized that we actually exericse at least some of the examples in our tests.

Leaving this for another day.

We are using these examples in the acceptance:

auth
content-negotiation
cookie-sessions
cookies
downloads
ejs
error-pages
error
hello-world
markdown
multi-router
mvc
params
resource
route-map
route-separation
vhost
web-service

@jonchurch jonchurch merged commit f4bd86e into expressjs:master Jul 27, 2024
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-ignore This change does not have any impact in semver (docs, tooling, etc..)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants