forked from extern/nushell
Update CI (#4445)
* Add different features combinations * Specify styles manually * Fix args * Fix typo * Let other CI jobs finish if one fails * Fix unused symbols without plugin feature * Put "which" tests behind "which" feature * Add Python virtualenv job * Oops forgot git command * Install Nushell in virtualenv tests * Add names to steps; Test v.env in separate step * cd into virtualenv * Do not run on Python 2.7 * Build Nushell after formatting and clippy checks
This commit is contained in:
parent
eceb2d5106
commit
94a0e3060a
89
.github/workflows/ci.yml
vendored
89
.github/workflows/ci.yml
vendored
@ -5,38 +5,101 @@ name: Continuous integration
|
|||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
style: [minimal, default, all]
|
||||||
rust:
|
rust:
|
||||||
- stable
|
- stable
|
||||||
|
include:
|
||||||
|
- style: minimal
|
||||||
|
flags: '--no-default-features'
|
||||||
|
- style: default
|
||||||
|
flags: ''
|
||||||
|
- style: all
|
||||||
|
flags: '--all-features'
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- name: Setup Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
profile: minimal
|
profile: minimal
|
||||||
toolchain: ${{ matrix.rust }}
|
toolchain: ${{ matrix.rust }}
|
||||||
override: true
|
override: true
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- name: Rustfmt
|
||||||
with:
|
uses: actions-rs/cargo@v1
|
||||||
command: build
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: test
|
|
||||||
args: --all --all-features
|
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
|
||||||
with:
|
with:
|
||||||
command: fmt
|
command: fmt
|
||||||
args: --all -- --check
|
args: --all -- --check
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- name: Clippy
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
command: clippy
|
command: clippy
|
||||||
args: --all --all-features -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
|
args: --all ${{ matrix.flags }} -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect
|
||||||
|
|
||||||
|
- name: Build Nushell
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
args: ${{ matrix.flags }}
|
||||||
|
|
||||||
|
- name: Tests
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
args: --all ${{ matrix.flags }}
|
||||||
|
|
||||||
|
|
||||||
|
python-virtualenv:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
rust:
|
||||||
|
- stable
|
||||||
|
py:
|
||||||
|
- py
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.platform }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: ${{ matrix.rust }}
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Install Nushell
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: install
|
||||||
|
args: --path=. --no-default-features
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
|
||||||
|
- run: python -m pip install tox
|
||||||
|
|
||||||
|
- name: Install virtualenv
|
||||||
|
run: |
|
||||||
|
git clone https://github.com/kubouch/virtualenv.git && \
|
||||||
|
cd virtualenv && \
|
||||||
|
git checkout engine-q-update
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
- name: Test Nushell in virtualenv
|
||||||
|
run: cd virtualenv && tox -e ${{ matrix.py }} -- -k nushell
|
||||||
|
shell: bash
|
||||||
|
@ -61,6 +61,7 @@ mod touch;
|
|||||||
mod uniq;
|
mod uniq;
|
||||||
mod update;
|
mod update;
|
||||||
mod where_;
|
mod where_;
|
||||||
|
#[cfg(feature = "which")]
|
||||||
mod which;
|
mod which;
|
||||||
mod with_env;
|
mod with_env;
|
||||||
mod wrap;
|
mod wrap;
|
||||||
|
@ -5,10 +5,12 @@ use nu_protocol::engine::{EngineState, Stack, StateDelta, StateWorkingSet};
|
|||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
const NUSHELL_FOLDER: &str = "nushell";
|
const NUSHELL_FOLDER: &str = "nushell";
|
||||||
const PLUGIN_FILE: &str = "plugin.nu";
|
|
||||||
const CONFIG_FILE: &str = "config.nu";
|
const CONFIG_FILE: &str = "config.nu";
|
||||||
const HISTORY_FILE: &str = "history.txt";
|
const HISTORY_FILE: &str = "history.txt";
|
||||||
|
#[cfg(feature = "plugin")]
|
||||||
|
const PLUGIN_FILE: &str = "plugin.nu";
|
||||||
|
|
||||||
|
#[cfg(feature = "plugin")]
|
||||||
pub(crate) fn read_plugin_file(engine_state: &mut EngineState, stack: &mut Stack) {
|
pub(crate) fn read_plugin_file(engine_state: &mut EngineState, stack: &mut Stack) {
|
||||||
// Reading signatures from signature file
|
// Reading signatures from signature file
|
||||||
// The plugin.nu file stores the parsed signature collected from each registered plugin
|
// The plugin.nu file stores the parsed signature collected from each registered plugin
|
||||||
|
Loading…
Reference in New Issue
Block a user