mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-30 13:47:46 +00:00

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.
27 lines
748 B
YAML
27 lines
748 B
YAML
on:
|
|
pull_request:
|
|
|
|
env:
|
|
NUSHELL_CARGO_PROFILE: ci
|
|
NU_LOG_LEVEL: DEBUG
|
|
|
|
jobs:
|
|
nu-check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: "Fetch main branch"
|
|
run: |
|
|
git fetch origin main --depth 1
|
|
- uses: hustcer/setup-nu@v3.9
|
|
with:
|
|
version: "*"
|
|
check-latest: true
|
|
# features: full # dataframe and extra included
|
|
- name: toolkit check pr
|
|
shell: nu {0}
|
|
# nix STUB_IDE_CHECK when nushell/nushell#12208 fixed
|
|
run: |
|
|
use ${{ github.workspace }}/toolkit.nu *
|
|
check pr --and-exit
|