Metadata-Version: 2.1
Name: crash-test-multipass
Version: 1.2
Summary: A command-line tool to create a Multipass instance and transfer a project to test to the newly created instance
Home-page: https://github.com/utox39/crashtest
License: MIT
Author: utox39
Author-email: francescomoccaldi39@gmail.com
Requires-Python: >=3.10
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Dist: colorama (>=0.4.6)
Project-URL: Bug Tracker, https://github.com/utox39/crashtest/issues
Project-URL: Repository, https://github.com/utox39/crashtest/issues
Description-Content-Type: text/markdown

# Crashtest

[![codecov](https://codecov.io/gh/utox39/crashtest/graph/badge.svg?token=WH50XIU1V9)](https://codecov.io/gh/utox39/crashtest)
[<img alt="PyPI - Version" src="https://img.shields.io/pypi/v/crash-test-multipass">
](https://pypi.org/project/crash-test-multipass/)
[<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dw/crash-test-multipass">
](https://pypistats.org/packages/crash-test-multipass)
[<img alt="GitHub Workflow Status (with event)" src="https://img.shields.io/github/actions/workflow/status/utox39/crashtest/.github%2Fworkflows%2Ftest-package.yml">
](https://github.com/utox39/crashtest/actions)
---

- [Description](#description)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)

## Description

Crashtest is a command-line tool to create a [Multipass](https://multipass.run/) instance and transfer a project to test
to the newly created instance.

## Requirements

- Python 3
- [Multipass](https://multipass.run/)

## Installation

```console
$ pip3 install --upgrade crash-test-multipass
```

NOTE: After installing crash-test-multipass with pip if you have not added ~/.local/bin (macOS/Linux) to $PATH you will
be asked to do so with a warning that should look like this:

```console
WARNING: The script crash-test-multipass is installed in '/home/ubuntu/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
```

## Usage

#### Create a new instance and transfer a project

```console
$ crashtest --instance-name INSTANCE_NAME --project PROJECT
```

#### Create a new instance, transfer a project and install the dependencies

NOTE: To install npm package dependencies, the latest stable version of [nvm](https://github.com/nvm-sh/nvm) will be
installed in the new multipass instance, which will install the latest LTS version of Node.

```console
$ crashtest --instance-name INSTANCE_NAME --project PROJECT --install-dependencies
```

#### Execute a custom script

> The script is executed in the home folder

```console
$ crashtest --instance-name INSTANCE_NAME --project PROJECT --script SCRIPT
```

#### Delete the instance after finishing to test

```console
$ crashtest --instance-name INSTANCE_NAME --project PROJECT --delete
```

## Contributing

If you would like to contribute to this project just create a pull request which I will try to review as soon as
possible.

