Skip to content

Commit 85f3042

Browse files
committed
add nextest
1 parent 0e03489 commit 85f3042

File tree

5 files changed

+65
-0
lines changed

5 files changed

+65
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ To use a feature from this repository, add it to a devcontainer.json. You can re
1414
| Wasm32-Unknown-Unknown | ghcr.io/lee-orr/rusty-dev-containers/wasm32-unknown-unknown:0 | There already exists a feature for wasm-wasi, but none for wasm32-unknown-unknown, which is useful for building wasm for the browser |
1515
| Wasm Bindgen CLI | ghcr.io/lee-orr/rusty-dev-containers/wasm-bindgen-cli:0 | Installs the [Wasm Bindgen CLI](https://rustwasm.github.io/wasm-bindgen/reference/cli.html) - a command line tool for generating javascript and typescript bindings for Rust WASM |
1616
| Cargo Bundle | ghcr.io/lee-orr/rusty-dev-containers/cargo-bundle:0 | Installs [Cargo Bundle](https://github.com/burtonageo/cargo-bundle) - a tool for wrapping rust executables in OS specific bundles/installers (.deb on linux, .app on Mac/iOS, .msi on Windows) |
17+
| Cargo Nexttest | ghcr.io/lee-orr/rusty-dev-containers/cargo-nextest:0 | Installs [Cargo Nextest](https://nexte.st/) - a powerful test runner for rust |
1718
| Cargo Mobile | ghcr.io/lee-orr/rusty-dev-containers/cargo-mobile:0 | Installs [Cargo Mobile](https://github.com/BrainiumLLC/cargo-mobile) - a tool for building & running rust apps on mobile |
1819
| | **Terminal Tools** | |
1920
| Bacon | ghcr.io/lee-orr/rusty-dev-containers/bacon:0 | Intalls [Bacon](https://github.com/Canop/bacon) - a terminal based rust code checker that can watch & run check, flippy, fmt, and tests in the background |

src/cargo-nextest/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
# cargo-nextest (cargo-nextest)
3+
4+
A feature to install cargo-nextest
5+
6+
## Example Usage
7+
8+
```json
9+
"features": {
10+
"ghcr.io/lee-orr/rusty-dev-containers/cargo-nextest:0": {}
11+
}
12+
```
13+
14+
## Options
15+
16+
| Options Id | Description | Type | Default Value |
17+
|-----|-----|-----|-----|
18+
19+
20+
21+
22+
---
23+
24+
_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/lee-orr/rusty-dev-containers/blob/main/src/cargo-nextest/devcontainer-feature.json). Add additional notes to a `NOTES.md`._
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "cargo-nextest",
3+
"id": "cargo-nextest",
4+
"version": "0.0.1",
5+
"description": "A feature to install cargo-nextest",
6+
"options": {
7+
},
8+
"installsAfter": [
9+
"ghcr.io/devcontainers/features/rust",
10+
"cargo_binstall"
11+
]
12+
}

src/cargo-nextest/install.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if ! (which rustup > /dev/null && which cargo > /dev/null); then
5+
which curl > /dev/null || (apt update && apt install curl -y -qq)
6+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7+
source $HOME/.cargo/env
8+
fi
9+
10+
dpkg -l | grep build-essential || (apt update && apt install build-essential -y -qq)
11+
12+
if ! cargo install --list | grep "cargo-binstall" > /dev/null; then
13+
cargo install cargo-binstall --locked
14+
fi
15+
16+
cargo binstall cargo-nextest --locked -y

test/cargo-nextest/test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
# Definition specific tests
9+
check "installed" cargo install --list | grep "cargo-nextest"
10+
11+
# Report result
12+
reportResults

0 commit comments

Comments
 (0)