nushell/.github/workflows/ci.yml

189 lines
5.1 KiB
YAML
Raw Normal View History

on:
pull_request:
push:
branches:
- main
2021-09-04 09:52:28 +02:00
2022-04-24 15:03:21 +02:00
name: continuous-integration
2021-09-04 09:52:28 +02:00
env:
NUSHELL_CARGO_PROFILE: ci
NU_LOG_LEVEL: DEBUG
# If changing these settings also change toolkit.nu
CLIPPY_OPTIONS: "-D warnings -D clippy::unwrap_used"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
2021-09-04 09:52:28 +02:00
jobs:
fmt-clippy:
2021-09-04 09:52:28 +02:00
strategy:
fail-fast: true
2021-09-04 09:52:28 +02:00
matrix:
# Pinning to Ubuntu 20.04 because building on newer Ubuntu versions causes linux-gnu
# builds to link against a too-new-for-many-Linux-installs glibc version. Consider
# revisiting this when 20.04 is closer to EOL (April 2025)
platform: [windows-latest, macos-latest, ubuntu-20.04]
Remove feat `extra` and include in default (#12140) # Description The intended effect of the `extra` feature has been undermined by introducing the full builds on our release pages and having more activity on some of the extra commands. To simplify the feature matrix let's get rid of it and focus our effort on truly either refining a command to well-specified behavior or discarding it entirely from the `nu` binary and moving it into plugins. ## Details - Remove `--features extra` from CI - Don't explicitly name `extra` in full build wf - Remove feature extra from build-help scripts - Update README in `nu-cmd-extra` - Remove feature `extra` - Fix previously dead `format pattern` tests - Relax signature of `to html` - Fix/ignore `html::test_no_color_flag` - Remove dead features from `version` - Refine `to html` type signature # User-Facing Changes The commands that were previously only available when building with `--features extra` will now be available to everyone. This increases the number of dependencies slightly but has a limited impact on the overall binary size. # Tests + Formatting Some tests that were left in `nu-command` during cratification were dead because the feature was not passed to `nu-command` and only to `nu-cmd-lang` for feature-flag mention in `version`. Those tests have now been either fixed or ignored in one case. # After Submitting There may be places in the documentation where we point to `--features extra` that will now be moot (apart from the generated command help)
2024-03-10 17:29:02 +01:00
feature: [default, dataframe]
include:
- feature: default
flags: ""
- feature: dataframe
flags: "--features=dataframe"
exclude:
- platform: windows-latest
feature: dataframe
- platform: macos-latest
feature: dataframe
2021-09-04 09:52:28 +02:00
2021-10-11 21:19:43 +02:00
runs-on: ${{ matrix.platform }}
2021-09-04 09:52:28 +02:00
steps:
- uses: actions/checkout@v4.1.2
2021-09-04 09:52:28 +02:00
2022-10-30 08:24:10 +01:00
- name: Setup Rust toolchain and cache
Bump actions-rust-lang/setup-rust-toolchain from 1.6.0 to 1.8.0 (#11539) Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.6.0 to 1.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.8.0</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>v1.7.0</h2> <h2>What's Changed</h2> <ul> <li>Allow overriding the toolchain file by <a href="https://github.com/Twey"><code>@​Twey</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li>ci: update checked rust-toolchain version by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> <li>Prepare 1.7.0 release by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/30">actions-rust-lang/setup-rust-toolchain#30</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Twey"><code>@​Twey</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li><a href="https://github.com/robjtede"><code>@​robjtede</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.8.0] - 2024-01-13</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>[1.7.0] - 2024-01-11</h2> <ul> <li>Allow overriding the toolchain file with explicit <code>toolchain</code> input. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/26">#26</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/b113a30d27a8e59c969077c0a0168cc13dab5ffc"><code>b113a30</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/34">#34</a> from actions-rust-lang/rel-180</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/039765bd186526e4d2e1b2f3ec14f5216b4d92bc"><code>039765b</code></a> chore: prepare release 1.8.0</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/84e65ce3155f72bc64fcd3fbc1eab7814e937925"><code>84e65ce</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/32">#32</a> from gruebel/add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/6f719a240eaaea9ba9c138657ae60ae23314e892"><code>6f719a2</code></a> Merge branch 'main' into add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/15d0afaad9a057d55c8c95034bfb3aacb990a6b0"><code>15d0afa</code></a> ci: fix cache test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/922cc935eba0313aadf10debf4b777609f674024"><code>922cc93</code></a> ci: add cache-workspaces test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/bcda41b18de1f885ca4a1ccfc0cd120c57bfe9ca"><code>bcda41b</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/33">#33</a> from fprasx/fprasx/fix-toolchain-overrides</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/ba41ca6f71dca3d3a627600631fedb7f260d083e"><code>ba41ca6</code></a> ci: clearer test names</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/aa089182f268c0255577cdc57a82a9b0819d59c3"><code>aa08918</code></a> ci: fix conditional</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/c6086ae6e539b9cca10fba3642fe77e559ba5705"><code>c6086ae</code></a> test: add toolchain file override test</li> <li>Additional commits viewable in <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6.0...v1.8.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions-rust-lang/setup-rust-toolchain&package-manager=github_actions&previous-version=1.6.0&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 03:27:41 +01:00
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
Prevent `rustflags` build config from being ignored in ci workflows (#9513) # Description Prevent `rustflags` build configuration from being ignored in github actions ci workflows. [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain/) used in ci workflows sets `RUSTFLAGS="-D warnings"` env variable by default. It has priority over some other sources of `rustflags` as described in [the cargo reference](https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags). Nushell is using `target.x86_64-pc-windows-msvc.rustflags` to statically link MSVC runtime in windows platform, but this config is being ignored in ci workflows. By unsetting `RUSTFLAGS` env variable, `rustflags` build configurations will be properly used in ci workflows. I assume that this was the cause of the installer verification failures on the recent winget submission PRs. For more details, refer discussions in https://github.com/microsoft/winget-pkgs/pull/106977 and https://github.com/nushell/nushell/pull/9322#issuecomment-1602932971. # User-Facing Changes Pre-built releases for windows that are created by the release ci workflow will now contain statically linked MSVC runtime. # Tests + Formatting Confirmed successful installation in a windows sandbox instance, which was failing before. It also contains changes made in #9514. Release ci workflow: https://github.com/wolimst/nushell/actions/runs/5357440849 Installer: https://github.com/wolimst/nushell/releases/tag/0.81.0-test # After Submitting Need to check the installer verification result in a winget submission PR for the next release, if this PR gets merged.
2023-06-23 21:53:45 +02:00
with:
rustflags: ""
- name: cargo fmt
run: cargo fmt --all -- --check
# If changing these settings also change toolkit.nu
- name: Clippy
run: cargo clippy --workspace ${{ matrix.flags }} --exclude nu_plugin_* -- $CLIPPY_OPTIONS
# In tests we don't have to deny unwrap
- name: Clippy of tests
run: cargo clippy --tests --workspace ${{ matrix.flags }} --exclude nu_plugin_* -- -D warnings
- name: Clippy of benchmarks
run: cargo clippy --benches --workspace ${{ matrix.flags }} --exclude nu_plugin_* -- -D warnings
tests:
strategy:
fail-fast: true
matrix:
platform: [windows-latest, macos-latest, ubuntu-20.04]
Remove feat `extra` and include in default (#12140) # Description The intended effect of the `extra` feature has been undermined by introducing the full builds on our release pages and having more activity on some of the extra commands. To simplify the feature matrix let's get rid of it and focus our effort on truly either refining a command to well-specified behavior or discarding it entirely from the `nu` binary and moving it into plugins. ## Details - Remove `--features extra` from CI - Don't explicitly name `extra` in full build wf - Remove feature extra from build-help scripts - Update README in `nu-cmd-extra` - Remove feature `extra` - Fix previously dead `format pattern` tests - Relax signature of `to html` - Fix/ignore `html::test_no_color_flag` - Remove dead features from `version` - Refine `to html` type signature # User-Facing Changes The commands that were previously only available when building with `--features extra` will now be available to everyone. This increases the number of dependencies slightly but has a limited impact on the overall binary size. # Tests + Formatting Some tests that were left in `nu-command` during cratification were dead because the feature was not passed to `nu-command` and only to `nu-cmd-lang` for feature-flag mention in `version`. Those tests have now been either fixed or ignored in one case. # After Submitting There may be places in the documentation where we point to `--features extra` that will now be moot (apart from the generated command help)
2024-03-10 17:29:02 +01:00
feature: [default, dataframe]
include:
Add shift + navigation functionality through reedline (#11535) This PR should close #1171 # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> This PR introduces the capability to select text using the existing move.. `EditCommand`s of `reedline`. Those commands are extended with an optional parameter specifying if text should be selected while navigating. This enables a workflow familiar from a wide variety of text editors, where holding `shift` while navigating selects all text between the initial cursor position when pressing `shift` and the current cursor position. Before this PR can be merged the [sibling PR for reedline](https://github.com/nushell/reedline/pull/689) has to land first. # User-Facing Changes ## Additional `EditCommand`s 1. `SelectAll` 2. `CutSelection` 3. `CopySelection` ## New optional parameter on existing `EditCommand`s All `EditCommand`s of `EditType` `MoveCursor` have a new optional parameter named `select` of type `bool`. If this parameter is not set by a user it is treated as false, which corresponds to their behavior up to now. I am relatively new to `nushell` and as such may not know of existing behavior that might change through this PR. However, I believe there should be none. I come to this conclusion because 1. Existing commands are extended only with an *optional* additional parameter, users who currently use these EditCommands keep their existing behavior if they don't use it. 2. A few new commands are introduced which were previously not valid. 3. The default keybindings specified in `default_config.nu` are untouched. # Tests + Formatting Tests for the new optional parameter for the move commands are included to make sure that they truly are optional and an unused optional parameter conforms to the previous behavior.
2024-01-20 15:04:06 +01:00
# linux CI cannot handle clipboard feature
- default-flags: ""
- platform: ubuntu-20.04
default-flags: "--no-default-features --features=default-no-clipboard"
- feature: default
flags: ""
- feature: dataframe
flags: "--features=dataframe"
exclude:
- platform: windows-latest
feature: dataframe
- platform: macos-latest
feature: dataframe
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4.1.2
2022-10-30 08:24:10 +01:00
- name: Setup Rust toolchain and cache
Bump actions-rust-lang/setup-rust-toolchain from 1.6.0 to 1.8.0 (#11539) Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.6.0 to 1.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.8.0</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>v1.7.0</h2> <h2>What's Changed</h2> <ul> <li>Allow overriding the toolchain file by <a href="https://github.com/Twey"><code>@​Twey</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li>ci: update checked rust-toolchain version by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> <li>Prepare 1.7.0 release by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/30">actions-rust-lang/setup-rust-toolchain#30</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Twey"><code>@​Twey</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li><a href="https://github.com/robjtede"><code>@​robjtede</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.8.0] - 2024-01-13</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>[1.7.0] - 2024-01-11</h2> <ul> <li>Allow overriding the toolchain file with explicit <code>toolchain</code> input. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/26">#26</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/b113a30d27a8e59c969077c0a0168cc13dab5ffc"><code>b113a30</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/34">#34</a> from actions-rust-lang/rel-180</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/039765bd186526e4d2e1b2f3ec14f5216b4d92bc"><code>039765b</code></a> chore: prepare release 1.8.0</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/84e65ce3155f72bc64fcd3fbc1eab7814e937925"><code>84e65ce</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/32">#32</a> from gruebel/add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/6f719a240eaaea9ba9c138657ae60ae23314e892"><code>6f719a2</code></a> Merge branch 'main' into add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/15d0afaad9a057d55c8c95034bfb3aacb990a6b0"><code>15d0afa</code></a> ci: fix cache test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/922cc935eba0313aadf10debf4b777609f674024"><code>922cc93</code></a> ci: add cache-workspaces test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/bcda41b18de1f885ca4a1ccfc0cd120c57bfe9ca"><code>bcda41b</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/33">#33</a> from fprasx/fprasx/fix-toolchain-overrides</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/ba41ca6f71dca3d3a627600631fedb7f260d083e"><code>ba41ca6</code></a> ci: clearer test names</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/aa089182f268c0255577cdc57a82a9b0819d59c3"><code>aa08918</code></a> ci: fix conditional</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/c6086ae6e539b9cca10fba3642fe77e559ba5705"><code>c6086ae</code></a> test: add toolchain file override test</li> <li>Additional commits viewable in <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6.0...v1.8.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions-rust-lang/setup-rust-toolchain&package-manager=github_actions&previous-version=1.6.0&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 03:27:41 +01:00
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
Prevent `rustflags` build config from being ignored in ci workflows (#9513) # Description Prevent `rustflags` build configuration from being ignored in github actions ci workflows. [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain/) used in ci workflows sets `RUSTFLAGS="-D warnings"` env variable by default. It has priority over some other sources of `rustflags` as described in [the cargo reference](https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags). Nushell is using `target.x86_64-pc-windows-msvc.rustflags` to statically link MSVC runtime in windows platform, but this config is being ignored in ci workflows. By unsetting `RUSTFLAGS` env variable, `rustflags` build configurations will be properly used in ci workflows. I assume that this was the cause of the installer verification failures on the recent winget submission PRs. For more details, refer discussions in https://github.com/microsoft/winget-pkgs/pull/106977 and https://github.com/nushell/nushell/pull/9322#issuecomment-1602932971. # User-Facing Changes Pre-built releases for windows that are created by the release ci workflow will now contain statically linked MSVC runtime. # Tests + Formatting Confirmed successful installation in a windows sandbox instance, which was failing before. It also contains changes made in #9514. Release ci workflow: https://github.com/wolimst/nushell/actions/runs/5357440849 Installer: https://github.com/wolimst/nushell/releases/tag/0.81.0-test # After Submitting Need to check the installer verification result in a winget submission PR for the next release, if this PR gets merged.
2023-06-23 21:53:45 +02:00
with:
rustflags: ""
- name: Tests
Add shift + navigation functionality through reedline (#11535) This PR should close #1171 # Description <!-- Thank you for improving Nushell. Please, check our [contributing guide](../CONTRIBUTING.md) and talk to the core team before making major changes. Description of your pull request goes here. **Provide examples and/or screenshots** if your changes affect the user experience. --> This PR introduces the capability to select text using the existing move.. `EditCommand`s of `reedline`. Those commands are extended with an optional parameter specifying if text should be selected while navigating. This enables a workflow familiar from a wide variety of text editors, where holding `shift` while navigating selects all text between the initial cursor position when pressing `shift` and the current cursor position. Before this PR can be merged the [sibling PR for reedline](https://github.com/nushell/reedline/pull/689) has to land first. # User-Facing Changes ## Additional `EditCommand`s 1. `SelectAll` 2. `CutSelection` 3. `CopySelection` ## New optional parameter on existing `EditCommand`s All `EditCommand`s of `EditType` `MoveCursor` have a new optional parameter named `select` of type `bool`. If this parameter is not set by a user it is treated as false, which corresponds to their behavior up to now. I am relatively new to `nushell` and as such may not know of existing behavior that might change through this PR. However, I believe there should be none. I come to this conclusion because 1. Existing commands are extended only with an *optional* additional parameter, users who currently use these EditCommands keep their existing behavior if they don't use it. 2. A few new commands are introduced which were previously not valid. 3. The default keybindings specified in `default_config.nu` are untouched. # Tests + Formatting Tests for the new optional parameter for the move commands are included to make sure that they truly are optional and an unused optional parameter conforms to the previous behavior.
2024-01-20 15:04:06 +01:00
run: cargo test --workspace --profile ci --exclude nu_plugin_* ${{ matrix.default-flags }} ${{ matrix.flags }}
- name: Check for clean repo
shell: bash
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes";
git status --porcelain
exit 1
else
echo "no changes in working directory";
fi
standard library: bring the tests into the main CI (#8525) Should close one of the tasks in #8450. # Description > **Note** > in order of appearance in the global diff - 1b7497c41966306aa3103a95a9b5ef5df7111ee4 adds the `std-tests` job to the CI which 1. installs `nushell` in the runner 2. run the `tests.nu` module > see `open .github/workflows/ci.yml | get jobs.std-tests | to yaml` - [`ec85b6fd`..`9c122115`](ec85b6fd3fc004cd94e3fada5c8e5fe2714fd629..9c12211564ca8ee90ed65ae45776dccb8f8e4ef1) is where all the magic happens => see below - :test_tube: 799c7eb7fd5f140289b36b9dbc00329c50e2fbda introduces some bugs and failing test to see how the CI behaves => see how the [tests failed](https://github.com/nushell/nushell/actions/runs/4460098237/jobs/7833018256) as expected :x: - :test_tube: and c3de1fafb5c5313e30c08c9ca57e09df33b61b74 reverts the failing tests, i.e. the previous commit, leaving a standard library whose tests all pass :tada: => see the [tests passing](https://github.com/nushell/nushell/actions/runs/4460153434/jobs/7833110719?pr=8525#step:5:1) now :heavy_check_mark: ## the changes to the runner > see [`ec85b6fd`..`9c122115`](ec85b6fd3fc004cd94e3fada5c8e5fe2714fd629..9c12211564ca8ee90ed65ae45776dccb8f8e4ef1) the issue with the previous runner was the following: the clever trick of using `nu -c "use ...; test"` did print the errors when occuring but they did not capture the true "failure", i.e. in all cases the `$env.LAST_EXIT_CODE` was set to `0`, never stopping the CI when a test failed :thinking: i first tried to `try` / `catch` the error in ec85b6fd3fc004cd94e3fada5c8e5fe2714fd629 which kinda worked but only throw a single error, the first one i thought it was not the best and started thinking about a solution to have a complete report of all failing tests, at once, to avoid running the CI multiple times! the easiest solution i found was the one i implemented in 9c12211564ca8ee90ed65ae45776dccb8f8e4ef1 > **Warning** > this changes the structure of the runner quite a bit, but the `for` loops where annoying to manipulate structured data and allow the runner to draw a complete report... now the runner does the following - compute the list of all available tests in a table with the `file`, `module` and `name` columns (first part of the pipe until `flatten` and `rename`) - run the tests one by one computing the new `pass` column - with a `log info` - captures the failing ones => puts `true` in `pass` if the test passes, `false` otherwise - if at least one test has failed, throw a single error with the list of failing tests ### hope you'll like it :relieved: # User-Facing Changes ``` $nothing ``` # Tests + Formatting the standard tests now return a true error that will stop the CI # After Submitting ``` $nothing ```
2023-03-25 19:29:08 +01:00
std-lib-and-python-virtualenv:
strategy:
fail-fast: true
matrix:
platform: [ubuntu-20.04, macos-latest, windows-latest]
2022-03-18 23:36:38 +01:00
py:
- py
runs-on: ${{ matrix.platform }}
2021-09-04 09:52:28 +02:00
steps:
- uses: actions/checkout@v4.1.2
2022-10-30 08:24:10 +01:00
- name: Setup Rust toolchain and cache
Bump actions-rust-lang/setup-rust-toolchain from 1.6.0 to 1.8.0 (#11539) Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.6.0 to 1.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.8.0</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>v1.7.0</h2> <h2>What's Changed</h2> <ul> <li>Allow overriding the toolchain file by <a href="https://github.com/Twey"><code>@​Twey</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li>ci: update checked rust-toolchain version by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> <li>Prepare 1.7.0 release by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/30">actions-rust-lang/setup-rust-toolchain#30</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Twey"><code>@​Twey</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li><a href="https://github.com/robjtede"><code>@​robjtede</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.8.0] - 2024-01-13</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>[1.7.0] - 2024-01-11</h2> <ul> <li>Allow overriding the toolchain file with explicit <code>toolchain</code> input. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/26">#26</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/b113a30d27a8e59c969077c0a0168cc13dab5ffc"><code>b113a30</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/34">#34</a> from actions-rust-lang/rel-180</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/039765bd186526e4d2e1b2f3ec14f5216b4d92bc"><code>039765b</code></a> chore: prepare release 1.8.0</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/84e65ce3155f72bc64fcd3fbc1eab7814e937925"><code>84e65ce</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/32">#32</a> from gruebel/add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/6f719a240eaaea9ba9c138657ae60ae23314e892"><code>6f719a2</code></a> Merge branch 'main' into add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/15d0afaad9a057d55c8c95034bfb3aacb990a6b0"><code>15d0afa</code></a> ci: fix cache test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/922cc935eba0313aadf10debf4b777609f674024"><code>922cc93</code></a> ci: add cache-workspaces test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/bcda41b18de1f885ca4a1ccfc0cd120c57bfe9ca"><code>bcda41b</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/33">#33</a> from fprasx/fprasx/fix-toolchain-overrides</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/ba41ca6f71dca3d3a627600631fedb7f260d083e"><code>ba41ca6</code></a> ci: clearer test names</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/aa089182f268c0255577cdc57a82a9b0819d59c3"><code>aa08918</code></a> ci: fix conditional</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/c6086ae6e539b9cca10fba3642fe77e559ba5705"><code>c6086ae</code></a> test: add toolchain file override test</li> <li>Additional commits viewable in <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6.0...v1.8.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions-rust-lang/setup-rust-toolchain&package-manager=github_actions&previous-version=1.6.0&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 03:27:41 +01:00
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
Prevent `rustflags` build config from being ignored in ci workflows (#9513) # Description Prevent `rustflags` build configuration from being ignored in github actions ci workflows. [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain/) used in ci workflows sets `RUSTFLAGS="-D warnings"` env variable by default. It has priority over some other sources of `rustflags` as described in [the cargo reference](https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags). Nushell is using `target.x86_64-pc-windows-msvc.rustflags` to statically link MSVC runtime in windows platform, but this config is being ignored in ci workflows. By unsetting `RUSTFLAGS` env variable, `rustflags` build configurations will be properly used in ci workflows. I assume that this was the cause of the installer verification failures on the recent winget submission PRs. For more details, refer discussions in https://github.com/microsoft/winget-pkgs/pull/106977 and https://github.com/nushell/nushell/pull/9322#issuecomment-1602932971. # User-Facing Changes Pre-built releases for windows that are created by the release ci workflow will now contain statically linked MSVC runtime. # Tests + Formatting Confirmed successful installation in a windows sandbox instance, which was failing before. It also contains changes made in #9514. Release ci workflow: https://github.com/wolimst/nushell/actions/runs/5357440849 Installer: https://github.com/wolimst/nushell/releases/tag/0.81.0-test # After Submitting Need to check the installer verification result in a winget submission PR for the next release, if this PR gets merged.
2023-06-23 21:53:45 +02:00
with:
rustflags: ""
- name: Install Nushell
standard library: bring the tests into the main CI (#8525) Should close one of the tasks in #8450. # Description > **Note** > in order of appearance in the global diff - 1b7497c41966306aa3103a95a9b5ef5df7111ee4 adds the `std-tests` job to the CI which 1. installs `nushell` in the runner 2. run the `tests.nu` module > see `open .github/workflows/ci.yml | get jobs.std-tests | to yaml` - [`ec85b6fd`..`9c122115`](ec85b6fd3fc004cd94e3fada5c8e5fe2714fd629..9c12211564ca8ee90ed65ae45776dccb8f8e4ef1) is where all the magic happens => see below - :test_tube: 799c7eb7fd5f140289b36b9dbc00329c50e2fbda introduces some bugs and failing test to see how the CI behaves => see how the [tests failed](https://github.com/nushell/nushell/actions/runs/4460098237/jobs/7833018256) as expected :x: - :test_tube: and c3de1fafb5c5313e30c08c9ca57e09df33b61b74 reverts the failing tests, i.e. the previous commit, leaving a standard library whose tests all pass :tada: => see the [tests passing](https://github.com/nushell/nushell/actions/runs/4460153434/jobs/7833110719?pr=8525#step:5:1) now :heavy_check_mark: ## the changes to the runner > see [`ec85b6fd`..`9c122115`](ec85b6fd3fc004cd94e3fada5c8e5fe2714fd629..9c12211564ca8ee90ed65ae45776dccb8f8e4ef1) the issue with the previous runner was the following: the clever trick of using `nu -c "use ...; test"` did print the errors when occuring but they did not capture the true "failure", i.e. in all cases the `$env.LAST_EXIT_CODE` was set to `0`, never stopping the CI when a test failed :thinking: i first tried to `try` / `catch` the error in ec85b6fd3fc004cd94e3fada5c8e5fe2714fd629 which kinda worked but only throw a single error, the first one i thought it was not the best and started thinking about a solution to have a complete report of all failing tests, at once, to avoid running the CI multiple times! the easiest solution i found was the one i implemented in 9c12211564ca8ee90ed65ae45776dccb8f8e4ef1 > **Warning** > this changes the structure of the runner quite a bit, but the `for` loops where annoying to manipulate structured data and allow the runner to draw a complete report... now the runner does the following - compute the list of all available tests in a table with the `file`, `module` and `name` columns (first part of the pipe until `flatten` and `rename`) - run the tests one by one computing the new `pass` column - with a `log info` - captures the failing ones => puts `true` in `pass` if the test passes, `false` otherwise - if at least one test has failed, throw a single error with the list of failing tests ### hope you'll like it :relieved: # User-Facing Changes ``` $nothing ``` # Tests + Formatting the standard tests now return a true error that will stop the CI # After Submitting ``` $nothing ```
2023-03-25 19:29:08 +01:00
run: cargo install --path . --locked --no-default-features
- name: Standard library tests
run: nu -c 'use crates/nu-std/testing.nu; testing run-tests --path crates/nu-std'
2022-03-18 23:36:38 +01:00
- name: Setup Python
Bump actions/setup-python from 4 to 5 (#11279) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/setup-python/releases">actions/setup-python's releases</a>.</em></p> <blockquote> <h2>v5.0.0</h2> <h2>What's Changed</h2> <p>In scope of this release, we update node version runtime from node16 to node20 (<a href="https://redirect.github.com/actions/setup-python/pull/772">actions/setup-python#772</a>). Besides, we update dependencies to the latest versions.</p> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0">https://github.com/actions/setup-python/compare/v4.8.0...v5.0.0</a></p> <h2>v4.8.0</h2> <h2>What's Changed</h2> <p>In scope of this release we added support for GraalPy (<a href="https://redirect.github.com/actions/setup-python/pull/694">actions/setup-python#694</a>). You can use this snippet to set up GraalPy:</p> <pre lang="yaml"><code>steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: 'graalpy-22.3' - run: python my_script.py </code></pre> <p>Besides, the release contains such changes as:</p> <ul> <li>Trim python version when reading from file by <a href="https://github.com/FerranPares"><code>@​FerranPares</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/628">actions/setup-python#628</a></li> <li>Use non-deprecated versions in examples by <a href="https://github.com/jeffwidman"><code>@​jeffwidman</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/724">actions/setup-python#724</a></li> <li>Change deprecation comment to past tense by <a href="https://github.com/jeffwidman"><code>@​jeffwidman</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/723">actions/setup-python#723</a></li> <li>Bump <code>@​babel/traverse</code> from 7.9.0 to 7.23.2 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/743">actions/setup-python#743</a></li> <li>advanced-usage.md: Encourage the use actions/checkout@v4 by <a href="https://github.com/cclauss"><code>@​cclauss</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/729">actions/setup-python#729</a></li> <li>Examples now use checkout@v4 by <a href="https://github.com/simonw"><code>@​simonw</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/738">actions/setup-python#738</a></li> <li>Update actions/checkout to v4 by <a href="https://github.com/dmitry-shibanov"><code>@​dmitry-shibanov</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/761">actions/setup-python#761</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/FerranPares"><code>@​FerranPares</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/628">actions/setup-python#628</a></li> <li><a href="https://github.com/timfel"><code>@​timfel</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/694">actions/setup-python#694</a></li> <li><a href="https://github.com/jeffwidman"><code>@​jeffwidman</code></a> made their first contribution in <a href="https://redirect.github.com/actions/setup-python/pull/724">actions/setup-python#724</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4...v4.8.0">https://github.com/actions/setup-python/compare/v4...v4.8.0</a></p> <h2>v4.7.1</h2> <h2>What's Changed</h2> <ul> <li>Bump word-wrap from 1.2.3 to 1.2.4 by <a href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/702">actions/setup-python#702</a></li> <li>Add range validation for toml files by <a href="https://github.com/dmitry-shibanov"><code>@​dmitry-shibanov</code></a> in <a href="https://redirect.github.com/actions/setup-python/pull/726">actions/setup-python#726</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/setup-python/compare/v4...v4.7.1">https://github.com/actions/setup-python/compare/v4...v4.7.1</a></p> <h2>v4.7.0</h2> <p>In scope of this release, the support for reading python version from pyproject.toml was added (<a href="https://redirect.github.com/actions/setup-python/pull/669">actions/setup-python#669</a>).</p> <pre lang="yaml"><code> - name: Setup Python uses: actions/setup-python@v4 &lt;/tr&gt;&lt;/table&gt; </code></pre> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/setup-python/commit/0a5c61591373683505ea898e09a3ea4f39ef2b9c"><code>0a5c615</code></a> Update action to node20 (<a href="https://redirect.github.com/actions/setup-python/issues/772">#772</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/0ae58361cdfd39e2950bed97a1e26aa20c3d8955"><code>0ae5836</code></a> Add example of GraalPy to docs (<a href="https://redirect.github.com/actions/setup-python/issues/773">#773</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/b64ffcaf5b410884ad320a9cfac8866006a109aa"><code>b64ffca</code></a> update actions/checkout to v4 (<a href="https://redirect.github.com/actions/setup-python/issues/761">#761</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/8d2896179abf658742de432b3f203d2c2d86a587"><code>8d28961</code></a> Examples now use checkout@v4 (<a href="https://redirect.github.com/actions/setup-python/issues/738">#738</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/7bc6abb01e0555719edc2dbca70a2fde309e5e56"><code>7bc6abb</code></a> advanced-usage.md: Encourage the use actions/checkout@v4 (<a href="https://redirect.github.com/actions/setup-python/issues/729">#729</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/e8111cec9d3dc15220d8a3b638f08419f57b906a"><code>e8111ce</code></a> Bump <code>@​babel/traverse</code> from 7.9.0 to 7.23.2 (<a href="https://redirect.github.com/actions/setup-python/issues/743">#743</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/a00ea43da65e7c04d2bdae58b3afecd77057eb9e"><code>a00ea43</code></a> add fix for graalpy ci (<a href="https://redirect.github.com/actions/setup-python/issues/741">#741</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/8635b1ccc5934e73ed3510980fd2e7790b85839b"><code>8635b1c</code></a> Change deprecation comment to past tense (<a href="https://redirect.github.com/actions/setup-python/issues/723">#723</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/f6cc428f535856f9c23558d01765a42a4d6cf758"><code>f6cc428</code></a> Use non-deprecated versions in examples (<a href="https://redirect.github.com/actions/setup-python/issues/724">#724</a>)</li> <li><a href="https://github.com/actions/setup-python/commit/5f2af211d616f86005883b44826180b21abb4060"><code>5f2af21</code></a> Add GraalPy support (<a href="https://redirect.github.com/actions/setup-python/issues/694">#694</a>)</li> <li>Additional commits viewable in <a href="https://github.com/actions/setup-python/compare/v4...v5">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-python&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-15 08:31:18 +01:00
uses: actions/setup-python@v5
2022-03-18 23:36:38 +01:00
with:
python-version: "3.10"
2022-03-18 23:36:38 +01:00
- name: Install virtualenv
run: pip install virtualenv
2022-03-18 23:36:38 +01:00
shell: bash
2022-03-18 23:36:38 +01:00
- name: Test Nushell in virtualenv
run: nu scripts/test_virtualenv.nu
2022-03-18 23:36:38 +01:00
shell: bash
2022-05-02 09:20:57 +02:00
- name: Check for clean repo
shell: bash
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes";
git status --porcelain
exit 1
else
echo "no changes in working directory";
fi
2022-05-02 09:20:57 +02:00
plugins:
strategy:
fail-fast: true
2022-05-02 09:20:57 +02:00
matrix:
platform: [windows-latest, macos-latest, ubuntu-20.04]
2022-05-02 09:20:57 +02:00
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4.1.2
2022-05-02 09:20:57 +02:00
2022-10-30 08:24:10 +01:00
- name: Setup Rust toolchain and cache
Bump actions-rust-lang/setup-rust-toolchain from 1.6.0 to 1.8.0 (#11539) Bumps [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain) from 1.6.0 to 1.8.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/releases">actions-rust-lang/setup-rust-toolchain's releases</a>.</em></p> <blockquote> <h2>v1.8.0</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>v1.7.0</h2> <h2>What's Changed</h2> <ul> <li>Allow overriding the toolchain file by <a href="https://github.com/Twey"><code>@​Twey</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li>ci: update checked rust-toolchain version by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> <li>Prepare 1.7.0 release by <a href="https://github.com/robjtede"><code>@​robjtede</code></a> in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/30">actions-rust-lang/setup-rust-toolchain#30</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Twey"><code>@​Twey</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/26">actions-rust-lang/setup-rust-toolchain#26</a></li> <li><a href="https://github.com/robjtede"><code>@​robjtede</code></a> made their first contribution in <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/29">actions-rust-lang/setup-rust-toolchain#29</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6...v1.7.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/blob/main/CHANGELOG.md">actions-rust-lang/setup-rust-toolchain's changelog</a>.</em></p> <blockquote> <h2>[1.8.0] - 2024-01-13</h2> <ul> <li>Allow specifying subdirectories for cache.</li> <li>Fix toolchain file overriding.</li> </ul> <h2>[1.7.0] - 2024-01-11</h2> <ul> <li>Allow overriding the toolchain file with explicit <code>toolchain</code> input. (<a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/26">#26</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/b113a30d27a8e59c969077c0a0168cc13dab5ffc"><code>b113a30</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/34">#34</a> from actions-rust-lang/rel-180</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/039765bd186526e4d2e1b2f3ec14f5216b4d92bc"><code>039765b</code></a> chore: prepare release 1.8.0</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/84e65ce3155f72bc64fcd3fbc1eab7814e937925"><code>84e65ce</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/32">#32</a> from gruebel/add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/6f719a240eaaea9ba9c138657ae60ae23314e892"><code>6f719a2</code></a> Merge branch 'main' into add-workspaces</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/15d0afaad9a057d55c8c95034bfb3aacb990a6b0"><code>15d0afa</code></a> ci: fix cache test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/922cc935eba0313aadf10debf4b777609f674024"><code>922cc93</code></a> ci: add cache-workspaces test</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/bcda41b18de1f885ca4a1ccfc0cd120c57bfe9ca"><code>bcda41b</code></a> Merge pull request <a href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/33">#33</a> from fprasx/fprasx/fix-toolchain-overrides</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/ba41ca6f71dca3d3a627600631fedb7f260d083e"><code>ba41ca6</code></a> ci: clearer test names</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/aa089182f268c0255577cdc57a82a9b0819d59c3"><code>aa08918</code></a> ci: fix conditional</li> <li><a href="https://github.com/actions-rust-lang/setup-rust-toolchain/commit/c6086ae6e539b9cca10fba3642fe77e559ba5705"><code>c6086ae</code></a> test: add toolchain file override test</li> <li>Additional commits viewable in <a href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.6.0...v1.8.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions-rust-lang/setup-rust-toolchain&package-manager=github_actions&previous-version=1.6.0&new-version=1.8.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 03:27:41 +01:00
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
Prevent `rustflags` build config from being ignored in ci workflows (#9513) # Description Prevent `rustflags` build configuration from being ignored in github actions ci workflows. [actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain/) used in ci workflows sets `RUSTFLAGS="-D warnings"` env variable by default. It has priority over some other sources of `rustflags` as described in [the cargo reference](https://doc.rust-lang.org/cargo/reference/config.html#buildrustflags). Nushell is using `target.x86_64-pc-windows-msvc.rustflags` to statically link MSVC runtime in windows platform, but this config is being ignored in ci workflows. By unsetting `RUSTFLAGS` env variable, `rustflags` build configurations will be properly used in ci workflows. I assume that this was the cause of the installer verification failures on the recent winget submission PRs. For more details, refer discussions in https://github.com/microsoft/winget-pkgs/pull/106977 and https://github.com/nushell/nushell/pull/9322#issuecomment-1602932971. # User-Facing Changes Pre-built releases for windows that are created by the release ci workflow will now contain statically linked MSVC runtime. # Tests + Formatting Confirmed successful installation in a windows sandbox instance, which was failing before. It also contains changes made in #9514. Release ci workflow: https://github.com/wolimst/nushell/actions/runs/5357440849 Installer: https://github.com/wolimst/nushell/releases/tag/0.81.0-test # After Submitting Need to check the installer verification result in a winget submission PR for the next release, if this PR gets merged.
2023-06-23 21:53:45 +02:00
with:
rustflags: ""
2022-05-02 09:20:57 +02:00
- name: Clippy
run: cargo clippy --package nu_plugin_* -- $CLIPPY_OPTIONS
2022-05-02 09:20:57 +02:00
- name: Tests
run: cargo test --profile ci --package nu_plugin_*
- name: Check for clean repo
shell: bash
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "there are changes";
git status --porcelain
exit 1
else
echo "no changes in working directory";
fi