Commit Graph

170 Commits

Author SHA1 Message Date
dependabot[bot]
de6edf18d9
Bump crate-ci/typos from 1.16.19 to 1.16.20 (#10813) 2023-10-23 14:13:44 +08:00
Justin Ma
066c9118ae
Update Nushell version to v0.86 for release script (#10797)
# Description
Follow up https://github.com/nushell/nushell/pull/10762, align with the
latest version
2023-10-21 19:13:25 +02:00
Darren Schroeder
4171c654a5
update release-pkg.nu with updated manual instructions (#10759)
# Description

This PR updates the release-pkg.nu script with updated instructions for
performing the release manually. These are there specifically because
winget fails so often and creating a x86_64 windows msi is not trivial.
There are also a couple minor changes to the script's syntax.

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2023-10-18 16:04:59 -05:00
JT
22ee041002
fix the flag type on release-pkg.nu (#10762)
# Description

Fix a breaking change based on how we do boolean flags in release-pkg.nu
2023-10-18 23:03:21 +02:00
Justin Ma
faf84e69b4
Fix winget release submission error (#10757)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# 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.
-->

Fix winget release submission error, more details could be found here:
https://github.com/nushell/nushell/pull/5812#issuecomment-1768294811

@fdncred @wolimst 

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
2023-10-18 13:00:19 -05:00
dependabot[bot]
25af32d3a8
Bump crate-ci/typos from 1.16.17 to 1.16.19 (#10731) 2023-10-16 18:28:49 +00:00
dependabot[bot]
4007256cfd
Bump crate-ci/typos from 1.16.15 to 1.16.17 (#10653) 2023-10-10 12:53:51 +00:00
Hofer-Julian
ff6c0fcb81
Add long options for filters (#10641) 2023-10-08 13:12:46 +02:00
dependabot[bot]
c4bbc3edad
Bump crate-ci/typos from 1.16.13 to 1.16.15 (#10575) 2023-10-02 09:56:38 +00:00
Justin Ma
20aaaaf90c
Update build flags for riscv64gc and armv7 targets (#10564)
Update build flags for riscv64gc and armv7 targets, as they are not
required any more, let's give it a try in nightly release
2023-10-01 09:32:34 +08:00
Mark Lansky
80220b722b
Completions: add support for doas as for sudo (#10256)
# Description

Fixes #2047 but for the `doas` command the same way as in #8094

# User-Facing Changes
No breaking changes. If people not using `doas`, no difference at all.

# Tests
I have not added any tests since its using same logic as for "sudo". I
guess if something would go wrong in this part, sudo tests will cover
it?

# Additional context
As a nushell user I could not find a way to implement custom completion
for a "sudo like command". Since I can see `sudo` being hardcoded in
sources, this is what I propose.

~~Also I have almost zero knowledge of rust and this is definitely not
the clean way yet~~

---------

Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
2023-09-28 15:29:57 +02:00
Justin Ma
5326e51e4f
Improve release script for github release workflow (#10502)
# Description

Improve release script for Github release workflow: Just some small
improvements
2023-09-25 19:55:51 +08:00
dependabot[bot]
b39cca91e5
Bump crate-ci/typos from 1.16.11 to 1.16.13 (#10493) 2023-09-25 11:02:27 +00:00
Justin Ma
95a4649cc9
Update winget submission workflow include only default msi files (#10487)
### Update winget submission workflow include only default msi files:
---
The new release workflow after
https://github.com/nushell/nushell/pull/10457 will add full featured
packages like: `nu-*-x86_64-windows-msvc-full.msi` and
`nu-*-aarch64-windows-msvc-full.msi` (A release preview could be found
here: https://github.com/nushell/nightly/releases/tag/nightly-6a2fd91 )
and this change will make sure only the default packages will be
included just the same as before to make sure that nothing will be
broken.

BTW: Due to lots of changes made recently about the release workflow, I
will stand-by for the next release.
2023-09-24 07:52:10 -05:00
Justin Ma
65c4083ae6
feat: Update nightly build workflow add full release support (#10485) 2023-09-24 10:15:38 +08:00
Justin Ma
a26a01c8d0
Add full releases of Nu binaries along with the standard releases (#10457)
# Description

Add full releases of Nu binaries along with the standard releases,
close: https://github.com/nushell/nushell/issues/10322

A full release means:

1. Build with `--features=dataframe,extra` flag
2. Contains `-full` in the package name

### **A test release could be found in the nushell/nightly Repo:
https://github.com/nushell/nightly/releases/tag/v0.85.1**
The action running log:
https://github.com/nushell/nightly/actions/runs/6260611553

# User-Facing Changes

Will attach the following release packages along with the official ones
as before:

1. nu-*-aarch64-darwin-full.tar.gz
2. nu-*-aarch64-linux-gnu-full.tar.gz
3. nu-*-aarch64-windows-msvc-full.msi
4. nu-*-aarch64-windows-msvc-full.zip
5. nu-*-x86_64-darwin-full.tar.gz
6. nu-*-x86_64-linux-gnu-full.tar.gz
7. nu-*-x86_64-linux-musl-full.tar.gz
8. nu-*-x86_64-windows-msvc-full.msi
9. nu-*-x86_64-windows-msvc-full.zip
2023-09-23 09:41:08 +08:00
Stefan Holderbach
19d732f313
Clippy in tests (#10394)
Running `cargo clippy --workspace --tests`

We should move that to CI as well
2023-09-16 21:49:10 +02:00
Justin Ma
88d79c84cd
Update Nu to v0.84 for release and nightly-build (#10334)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
Update Nu to v0.84 for release and nightly-build
2023-09-12 22:00:58 +08:00
Justin Ma
abcb0877e2
Upgrade softprops/action-gh-release to v0.1.15 for release and nightly build workflow (#10331) 2023-09-12 21:05:55 +08:00
Stefan Holderbach
baa50ec9b2
Update crates-ci/typos and fix new typos (#10313)
Supersedes #10309
2023-09-11 12:37:06 +02:00
dependabot[bot]
94fc33bbee
Bump actions/checkout from 3 to 4 (#10308) 2023-09-11 09:54:22 +00:00
Stefan Holderbach
ae54dc862c
Move spellcheck config into .github folder (#10267)
Keep the `.typos.toml` out of the repo root for better readability

Also specify a version for the workflow to protect against breakage
2023-09-07 22:46:00 +02:00
Skyler Hawthorne
9a4dad6ca1
Fix unit tests on Android (#10224)
# Description

* The path to the binaries for tests is slightly incorrect. It is
missing the build target when it is set with the `CARGO_BUILD_TARGET`
environment variable. For example, when `CARGO_BUILD_TARGET` is set to
`aarch64-linux-android`, the path to the `nu` binary is:

  `./target/aarch64-linux-android/debug/nu`

  rather than

  `./target/debug/nu`

This is common on Termux since the default target that rustc detects can
cause problems on some projects, such as [python's `cryptography`
package](https://github.com/pyca/cryptography/issues/7248).
  
This technically isn't a problem specific to Android, but is more likely
to happen on Android due to the latter.
* Additionally, the existing variable named `NUSHELL_CARGO_TARGET` is in
fact the profile, not the build target, so this was renamed to
`NUSHELL_CARGO_PROFILE`. This change is included because without the
rename, the build system would be using `CARGO_BUILD_TARGET` for the
build target and `NUSHELL_CARGO_TARGET` for the build profile, which is
confusing.
* `std path add` tests were missing `android` test

# User-Facing Changes

For those who would like to build nushell on Termux, the unit tests will
pass now.
2023-09-05 20:17:34 +12:00
nibon7
27dcc3ecc3
Don't use oldtime feature of chrono (#9577)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
`chrono` crate enables `oldtime` feature by default, which has a
vulnerability (https://rustsec.org/advisories/RUSTSEC-2020-0071). This
PR tries to remove `time` v0.1.45 completely from nu and add an audit CI
to check for security vulnerabilities.

 Wait for the following PRs:
- [x] https://github.com/nushell/reedline/pull/599
- [x] https://github.com/bspeice/dtparse/pull/44
- [x] https://github.com/Byron/trash-rs/pull/75
- [x] https://gitlab.com/imp/chrono-humanize-rs/-/merge_requests/15

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->

---------

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2023-08-25 10:54:01 +02:00
Hofer-Julian
030e749fe7
Add notice to enable develop mode on Windows (#10111)
Developer mode needs to be enabled to create symlinks on Windows. Since
creating symlinks is part of the testbench, this needs to be enabled.

(I always wondered why two tests fail on my Windows machine, but not on
the CI)
2023-08-24 11:02:54 -07:00
Antoine Stevan
a5087c4966
remove Clippy flags from the PR template (#10087)
related to
- https://github.com/nushell/nushell/pull/10072
- https://github.com/nushell/nushell/pull/10073

cc/ @sholderbach 

# Description
i think the PR template was the missing place where a `cargo clippy`
appears 😏
2023-08-21 19:45:48 +02:00
Stefan Holderbach
43ceb3edec
Remove clippy global -A from CI (#10072)
# Description
We allowed two default lints due to false positives. This should be
locally addressed with explicit information what causes either a false
positive or why a particular design choice in the code is made.


# User-Facing Changes
None

# Tests + Formatting
We should detect a few more things with clippy out of the box. If you
encounter a false positive you will need to address it on a case by case
basis.
2023-08-21 00:08:49 +02:00
Jakub Žádník
10fc32e3ef
Simplify virtualenv testing (#10035)
Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com>
Co-authored-by: Antoine Stevan <44101798+amtoine@users.noreply.github.com>
2023-08-20 17:00:59 +03:00
sitiom
68a821c84a
Change Winget Releaser job to ubuntu-latest (#10032)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# 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.
-->

Winget Releaser now supports non-Windows runners, and `ubuntu-latest` is
generally faster.
2023-08-17 10:12:16 -05:00
Antoine Stevan
ca794f6adb
fix the std test commands calls in dev documents (#9535)
related to a comment in https://github.com/nushell/nushell/pull/9500
> `cargo run -- crates/nu-std/tests/run.nu` Not done - doesn't seem to
work

this is absolutely true because the command in the PR template was
obsolete...
i've also updated the commands in the `CONTRIBUTING` document of the
library 👍

cc/ @fnordpig
2023-07-12 18:26:47 +02:00
Antoine Stevan
667502e8da
refactor the CI (#9626)
# Description
this PR is an attempt at making the main CI workflow a bit easier to
read, understand and work with 🤞

## changelog
- remove the deprecated `nu-coverage` job which was taking place for
nothing
- remove useless comments, i.e. comments that just say the same thing as
the line they comment, e.g. the previous `on.push` comment, and comments
that can be explained with a `git blame` inside an IDE, e.g. the comment
about removing `--profile ci` on the `cargo install` in the std job
- rename `nu-fmt-clippy` and `nu-tests` to `fmt-clippy` and `tests` as
we already know we are working with Nushell
- rename the "*style*" to "*feature*" which is exactly what `default`,
`dataframe` and `extra` are
- remove the `strategy.matrix.rust: stable` key: i couldn't find any
documentation for this and it's not used in the jobs => by default, the
toolchain of `actions-rust-lang/setup-rust-toolchain@v1.5.0` is the
stable one (see the
[documentation](https://github.com/actions-rust-lang/setup-rust-toolchain#inputs))
- add a top-level `env` block with all the environment variables, e.g.
`CLIPPY_OPTIONS`, to have them all in one place

hope you'll like that 😇 🙏 

# User-Facing Changes

# Tests + Formatting
this PR should not change the different jobs being run in PRs and on the
`main` branch.

# After Submitting
2023-07-08 12:48:01 +02:00
JT
4af24363c2
remove let-env, focus on mutating $env (#9574)
# Description

For years, Nushell has used `let-env` to set a single environment
variable. As our work on scoping continued, we refined what it meant for
a variable to be in scope using `let` but never updated how `let-env`
would work. Instead, `let-env` confusingly created mutations to the
command's copy of `$env`.

So, to help fix the mental model and point people to the right way of
thinking about what changing the environment means, this PR removes
`let-env` to encourage people to think of it as updating the command's
environment variable via mutation.

Before:

```
let-env FOO = "BAR"
```

Now:

```
$env.FOO = "BAR"
```

It's also a good reminder that the environment owned by the command is
in the `$env` variable rather than global like it is in other shells.

# User-Facing Changes

BREAKING CHANGE BREAKING CHANGE

This completely removes `let-env FOO = "BAR"` so that we can focus on
`$env.FOO = "BAR"`.

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After / Before Submitting
integration scripts to update:
- ✔️
[starship](https://github.com/starship/starship/blob/master/src/init/starship.nu)
- ✔️
[virtualenv](https://github.com/pypa/virtualenv/blob/main/src/virtualenv/activation/nushell/activate.nu)
- ✔️
[atuin](https://github.com/ellie/atuin/blob/main/atuin/src/shell/atuin.nu)
(PR: https://github.com/ellie/atuin/pull/1080)
- 
[zoxide](https://github.com/ajeetdsouza/zoxide/blob/main/templates/nushell.txt)
(PR: https://github.com/ajeetdsouza/zoxide/pull/587)
- ✔️
[oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/src/shell/scripts/omp.nu)
(pr: https://github.com/JanDeDobbeleer/oh-my-posh/pull/4011)
2023-07-01 07:57:51 +12:00
nibon7
11132f7353
Fix cargo-build-nu (#9571)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
This PR should fix #9565

Close #9565 

cc @hustcer 

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2023-06-30 20:53:34 +08:00
nibon7
d3919a311f
Refactor cargo-build-nu (#9554)
# Description
This PR refactors `cargo-build-nu`

cc @hustcer 

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A
clippy::needless_collect -A clippy::result_large_err` to check that
you're using the standard code style
- `cargo test --workspace` to check that all tests pass
- `cargo run -- crates/nu-std/tests/run.nu` to run the tests for the
standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2023-06-29 12:43:09 +08:00
nibon7
3ed44992e6
Fix release workflows (#9542) 2023-06-28 09:15:32 +08:00
Woohyun Lim
7926e4ab6d
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 14:53:45 -05:00
Stefan Holderbach
64319ad90f
Move the nightly issue template to a hidden place (#9495)
# Description
The issue template to report a build failure in our nightly-build CI was
also appearing among the options for a user to pick from.

Moved over to a separate folder `.github/AUTO_ISSUE_TEMPLATE`
2023-06-21 22:41:57 +08:00
Justin Ma
a94b3212a3
Change the nightly build schedule make it start by 9:15 BeiJing Time (#9442)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

Change the nightly build schedule make it start by 9:15 BeiJing Time or
01:15 UTC time
Tweak cleanup a bit
2023-06-15 14:37:08 +08:00
Justin Ma
b907bf355f
Fix cleanup of nightly build workflow (#9441)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

Fix cleanup of nightly build workflow
2023-06-15 11:11:08 +08:00
Michael Angerman
b5d43f1e20
add in the nu-cmd-extra tests to the CI (#9439)
See if the CI passes with the nu-cmd-extra tests...
2023-06-14 16:06:22 -07:00
Justin Ma
96ee57ae5c
Fix the cleanup of old nightly releases (#9433)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

1. Fix the cleanup of old nightly releases
2. Fix `short_sha` clac for nightly releases
2023-06-14 14:55:04 +08:00
Justin Ma
d4cd171d6b
Use Nushell v0.81 for release workflows (#9432)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

Use Nushell v0.81 for release workflows
2023-06-14 14:02:48 +08:00
Justin Ma
30ccabde5b
Synchronize code before the nightly build starts (#9430)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description
Synchronize code before the nightly build starts
2023-06-14 12:26:09 +08:00
Justin Ma
f438ffc6e4
Fix removal of old nightly releases (#9423)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

Fix removal of old nightly releases
2023-06-13 21:43:07 +08:00
Justin Ma
26c489a0f5
Try to make a nightly release by workflow (#9422) 2023-06-13 20:38:00 +08:00
dependabot[bot]
58f255c0c7
Bump actions-rust-lang/setup-rust-toolchain from 1.4.4 to 1.5.0 (#9363)
Bumps
[actions-rust-lang/setup-rust-toolchain](https://github.com/actions-rust-lang/setup-rust-toolchain)
from 1.4.4 to 1.5.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.5.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Check that listed components and targets are installed even with a
rust-toolchain file by <a
href="https://github.com/jonasbb"><code>@​jonasbb</code></a> in <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/19">actions-rust-lang/setup-rust-toolchain#19</a></li>
<li>allow disabling RUSTFLAGS config by <a
href="https://github.com/JeanMertz"><code>@​JeanMertz</code></a> in <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/18">actions-rust-lang/setup-rust-toolchain#18</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/JeanMertz"><code>@​JeanMertz</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/pull/18">actions-rust-lang/setup-rust-toolchain#18</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.5.0">https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1...v1.5.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.5.0] - 2023-05-29</h2>
<h3>Added</h3>
<ul>
<li>
<p>Support installing additional components and targets that are not
listed in <code>rust-toolchain</code> (<a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/14">#14</a>)
Before only the items listed in <code>rust-toolchain</code> were
installed.
Now all the items from the toolchain file are installed and then all the
<code>target</code>s and <code>components</code> that are provided as
action inputs.
This allows installing extra tools only for CI or simplify testing
special targets in CI.</p>
</li>
<li>
<p>Allow skipping the creation of a <code>RUSTFLAGS</code> environment
variable.
Cargos logic for rustflags is complicated, and setting the
<code>RUSTFLAGS</code> environment variable prevents other ways of
working.
Provide a new <code>rustflags</code> input, which controls the
environment variable creation.
If the value is set to the empty string, then <code>RUSTFLAGS</code> is
not created.</p>
<p>Pre-existing <code>RUSTFLAGS</code> variables are never modified by
this extension.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f3c84ee10b"><code>f3c84ee</code></a>
Merge pull request <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/18">#18</a>
from JeanMertz/rustflags</li>
<li><a
href="1ef811fbfb"><code>1ef811f</code></a>
Restore behavior to not touch existing RUSTFLAGS variable</li>
<li><a
href="70241ab2e9"><code>70241ab</code></a>
fixes</li>
<li><a
href="823a4a135d"><code>823a4a1</code></a>
fixes</li>
<li><a
href="aaa7eef1a2"><code>aaa7eef</code></a>
requred -&gt; required</li>
<li><a
href="24274e4435"><code>24274e4</code></a>
allow disabling <code>RUSTFLAGS</code> config</li>
<li><a
href="cf60eafd0a"><code>cf60eaf</code></a>
Merge pull request <a
href="https://redirect.github.com/actions-rust-lang/setup-rust-toolchain/issues/19">#19</a>
from actions-rust-lang/better-toolchain-support</li>
<li><a
href="289d5e6164"><code>289d5e6</code></a>
Add changelog</li>
<li><a
href="661e2d23dd"><code>661e2d2</code></a>
Explain the new behavior in the README</li>
<li><a
href="b065e5ab9f"><code>b065e5a</code></a>
Install components and targets after installing everything from the
rust-tool...</li>
<li>Additional commits viewable in <a
href="https://github.com/actions-rust-lang/setup-rust-toolchain/compare/v1.4.4...v1.5.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.4.4&new-version=1.5.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 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-06-13 07:31:23 -05:00
Justin Ma
439fe973c4
Reset .github/workflows/release-pkg.nu (#9414)
<!--
if this PR closes one or more issues, you can automatically link the PR
with
them by using one of the [*linking
keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword),
e.g.
- this PR should close #xxxx
- fixes #xxxx

you can also mention related issues, PRs or discussions!
-->

# Description

We don't need to modify this file to disable the building of
`riscv64gc-unknown-linux-gnu` and `armv7-unknown-linux-gnueabihf`
binaries, just modify the `.github/workflows/release.yml` file is
enough.
Reset this file to make `.github/workflows/nightly-build.yml` work less
wrong
2023-06-12 10:40:18 +08:00
Yethal
0bdc362e13
std: refactor test-runner to no longer require tests to be exported (#9355)
# Description
Test runner now performs following actions in order to run tests:
* Module file is opened
* Public function with random name is added to the source code, this
function calls user-specified private function
* Modified module file is saved under random name in $nu.temp-path
* Modified module file is imported in subprocess, injected function is
called by the test runner
# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->
* Test functions no longer need to be exported
* test functions no longer need to reside in separate test_ files
* setup and teardown renamed to before-each and after-each respectively
* before-all and after-all functions added that run before all tests in
given module. This matches the behavior of test runners used by other
languages such as JUnit/TestNG or Mocha
# Tests + Formatting

# After Submitting

---------

Co-authored-by: Kamil <skelly37@protonmail.com>
Co-authored-by: amtoine <stevan.antoine@gmail.com>
2023-06-10 20:16:17 +02:00
Antoine Stevan
e605d8007c
add a comment note to the PR template about linking issues (#9392)
i see very often contributors mentionning an issue that their PR is
supposed to solve without using the proper [*linking keywords* of
*GitHub*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
🤔

in this PR, i've added a little comment to the top of the PR template to
hopefully explain how to achieve this automatically without requiring
maintainers to link PRs manually 😌
2023-06-10 10:10:03 -05:00
Justin Ma
74ba00a222
Try to add a nightly-build checking workflow (#9385)
# Description

Try to add a nightly-build workflow, relevant issue:
https://github.com/nushell/nushell/issues/9383

1. It will try to build the release binaries nightly at 3 am
1. It will create an issue like this:
https://github.com/hustcer/nu-release/issues/37 if the build fails
2. Add a Nightly Build status badge to README.md
2023-06-08 21:15:56 +08:00