forked from prefix-dev/pixi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Use cargo-nextest from within a pixi task (prefix-dev#2305)
Also remove `test_environment_json` since it doesn't work when run from within pixi
- Loading branch information
1 parent
5bb65ce
commit f33bee8
Showing
8 changed files
with
131 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,35 +128,15 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: taiki-e/setup-cross-toolchain-action@v1 | ||
- uses: prefix-dev/setup-[email protected] | ||
with: | ||
target: ${{ matrix.target }} | ||
|
||
cache: true | ||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Show version information (Rust, cargo, GCC) | ||
shell: bash | ||
run: | | ||
gcc --version || true | ||
rustup -V | ||
rustup toolchain list | ||
cargo -V | ||
rustc -V | ||
- name: "Install cargo nextest" | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest | ||
|
||
- uses: rui314/setup-mold@v1 | ||
|
||
- name: "Cargo nextest" | ||
run: >- | ||
cargo nextest run | ||
--workspace | ||
--retries 2 | ||
--no-default-features --features rustls-tls --features slow_integration_tests | ||
--status-level skip --failure-output immediate-final --no-fail-fast --final-status-level slow | ||
workspaces: ". -> target-pixi" | ||
key: ${{ hashFiles('pixi.lock') }} | ||
- name: Test pixi | ||
run: pixi run test-workspace | ||
|
||
build: | ||
name: Build Binary | ${{ matrix.name }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
from enum import StrEnum | ||
import subprocess | ||
import sys | ||
|
||
|
||
class Colors(StrEnum): | ||
GREEN = "\033[92m" | ||
RED = "\033[91m" | ||
RESET = "\033[0m" | ||
|
||
|
||
def colored_print(message: str, color: Colors) -> None: | ||
print(f"{color}{message}{Colors.RESET}") | ||
|
||
|
||
def check_openssl_dependency() -> None: | ||
# Run the cargo tree command | ||
result = subprocess.run( | ||
["cargo", "tree", "-i", "openssl", "--workspace"], | ||
capture_output=True, | ||
text=True, | ||
) | ||
|
||
if result.returncode == 0: | ||
colored_print("Error: openssl is part of the dependencies tree", Colors.RED) | ||
print(result.stdout) | ||
sys.exit(1) | ||
|
||
# Check if the error message matches the expected message | ||
if "package ID specification `openssl` did not match any packages" in result.stderr: | ||
colored_print("Success: openssl is not part of the dependencies tree.", Colors.GREEN) | ||
else: | ||
colored_print("Error: Unexpected error message.", Colors.RED) | ||
print(result.stderr) | ||
sys.exit(1) | ||
|
||
|
||
if __name__ == "__main__": | ||
check_openssl_dependency() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters