mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 08:06:38 +00:00
Add e2e-test/private-github-repo
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
fba7e01c5d
commit
be3aeca6b2
3 changed files with 36 additions and 1 deletions
13
e2e-tests/manifests/private-github-repo-test-Cargo.toml
Normal file
13
e2e-tests/manifests/private-github-repo-test-Cargo.toml
Normal file
|
@ -0,0 +1,13 @@
|
|||
[package]
|
||||
name = "cargo-binstall"
|
||||
description = "Rust binary package installer for CI integration"
|
||||
repository = "https://github.com/cargo-bins/private-repo-for-testing"
|
||||
version = "0.12.0"
|
||||
rust-version = "1.61.0"
|
||||
authors = ["ryan <ryan@kurte.nz>"]
|
||||
edition = "2021"
|
||||
license = "GPL-3.0"
|
||||
|
||||
[[bin]]
|
||||
name = "cargo-binstall"
|
||||
path = "src/main.rs"
|
21
e2e-tests/private-github-repo.sh
Executable file
21
e2e-tests/private-github-repo.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
unset CARGO_INSTALL_ROOT
|
||||
|
||||
CARGO_HOME=$(mktemp -d 2>/dev/null || mktemp -d -t 'cargo-home')
|
||||
export CARGO_HOME
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
|
||||
# Install binaries using `--manifest-path`
|
||||
# Also test default github template
|
||||
"./$1" binstall --force --manifest-path "manifests/private-github-repo-test-Cargo.toml" --no-confirm cargo-binstall --strategies crate-meta-data
|
||||
|
||||
# Test that the installed binaries can be run
|
||||
cargo binstall --help >/dev/null
|
||||
|
||||
cargo_binstall_version="$(cargo binstall -V)"
|
||||
echo "$cargo_binstall_version"
|
||||
|
||||
[ "$cargo_binstall_version" = "cargo-binstall 0.12.0" ]
|
Loading…
Add table
Add a link
Reference in a new issue