Skip to content

Conversation

@NotTheDr01ds
Copy link
Contributor

Since #791 (and possibly before), any non-module Nushell file pushed to nu_scripts will fail CI since it attempts to use <file.nu> during linting.

In addition, the #791 implementation could execute code during linting, since it actually imported potentially working code.

This PR updates the toolkit testing to:

  • Determine whether to lint as a module or source file based on the presence of any export line in the file.
  • Run nu-check on files before linting with use <file> or source <file>
  • Updates the environment variable to TEST_METHOD with options for ide-check or import-or-source.
  • Updates the default to import-or-source (was ide-check) to match CI
  • Removes environment variable from CI since this test method is now the default.

With this in place we should have far fewer (false positive) failing CI runs.

Copy link
Contributor

@fdncred fdncred left a comment

Choose a reason for hiding this comment

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

I'm fine with running with this to see how it works.

@NotTheDr01ds NotTheDr01ds merged commit c17dcc3 into nushell:main Feb 17, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants