mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-16 15:46:36 +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" ]
|
3
justfile
3
justfile
|
@ -248,6 +248,7 @@ e2e-test-git: (e2e-test "git")
|
|||
e2e-test-registries: (e2e-test "registries")
|
||||
e2e-test-signing: (e2e-test "signing")
|
||||
e2e-test-continue-on-failure: (e2e-test "continue-on-failure")
|
||||
e2e-test-private-github-repo: (e2e-test "private-github-repo")
|
||||
|
||||
# WinTLS (Windows in CI) does not have TLS 1.3 support
|
||||
[windows]
|
||||
|
@ -256,7 +257,7 @@ e2e-test-tls: (e2e-test "tls" "1.2")
|
|||
[macos]
|
||||
e2e-test-tls: (e2e-test "tls" "1.2") (e2e-test "tls" "1.3")
|
||||
|
||||
e2e-tests: e2e-test-live e2e-test-manifest-path e2e-test-git e2e-test-other-repos e2e-test-strategies e2e-test-version-syntax e2e-test-upgrade e2e-test-tls e2e-test-self-upgrade-no-symlink e2e-test-uninstall e2e-test-subcrate e2e-test-no-track e2e-test-registries e2e-test-signing e2e-test-continue-on-failure
|
||||
e2e-tests: e2e-test-live e2e-test-manifest-path e2e-test-git e2e-test-other-repos e2e-test-strategies e2e-test-version-syntax e2e-test-upgrade e2e-test-tls e2e-test-self-upgrade-no-symlink e2e-test-uninstall e2e-test-subcrate e2e-test-no-track e2e-test-registries e2e-test-signing e2e-test-continue-on-failure e2e-test-private-github-repo
|
||||
|
||||
unit-tests: print-env
|
||||
{{cargo-bin}} test {{cargo-build-args}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue