mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 06:37:46 +00:00
Refactor toolkit.nu (#791)
Closes #789 🍻 - Runs without first generating a script - Returns error (file) count - Requires `--and-exit` to exit with error code - Enables alternative report with env `STUB_IDE_CHECK=true` - Expands documentation - All subcommands share same file querying - Prepares for nupm test integration
This commit is contained in:
parent
191636af9c
commit
878bfc615c
3 changed files with 108 additions and 71 deletions
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
@ -1,5 +1,5 @@
|
|||
on:
|
||||
pull_request:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
NUSHELL_CARGO_PROFILE: ci
|
||||
|
@ -11,19 +11,17 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: 'Fetch main branch'
|
||||
- name: "Fetch main branch"
|
||||
run: |
|
||||
git fetch origin main --depth 1
|
||||
git fetch origin main --depth 1
|
||||
- uses: hustcer/setup-nu@v3.9
|
||||
with:
|
||||
version: '*'
|
||||
check-latest: true
|
||||
features: full # dataframe and extra included
|
||||
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: |
|
||||
nu -c "use toolkit.nu *; check pr"
|
||||
- name: run nu-check on modified files
|
||||
shell: nu {0}
|
||||
run: |
|
||||
nu ./check-files.nu
|
||||
use ${{ github.workspace }}/toolkit.nu *
|
||||
STUB_IDE_CHECK=true check pr --and-exit
|
||||
|
|
24
.github/workflows/daily.yml
vendored
24
.github/workflows/daily.yml
vendored
|
@ -1,9 +1,9 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: '30 0 * * *' # every day at 00:30 AM UTC
|
||||
- cron: "30 0 * * *" # every day at 00:30 AM UTC
|
||||
|
||||
env:
|
||||
NUSHELL_CARGO_PROFILE: ci
|
||||
|
@ -15,19 +15,17 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: 'Fetch main branch'
|
||||
- name: "Fetch main branch"
|
||||
run: |
|
||||
git fetch origin main --depth 1
|
||||
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 generate-file-list --full
|
||||
version: "*"
|
||||
check-latest: true
|
||||
features: full # dataframe and extra included
|
||||
- name: toolkit check pr --full
|
||||
shell: nu {0}
|
||||
# nix STUB_IDE_CHECK when nushell/nushell#12208 fixed
|
||||
run: |
|
||||
nu -c "use toolkit.nu *; generate-file-list --full"
|
||||
- name: run nu-check on all files
|
||||
shell: nu {0}
|
||||
run: |
|
||||
nu ./check-files.nu
|
||||
use ${{ github.workspace }}/toolkit.nu *
|
||||
STUB_IDE_CHECK=true check pr --full --and-exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue