Skip to content

Commit

Permalink
feat: adapt documentation to show linux and windows processes
Browse files Browse the repository at this point in the history
  • Loading branch information
merydian committed Jul 22, 2024
1 parent 3b6cfed commit bc26cf6
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,41 @@ where `<qgis_plugins_path>` is one of:
The repository tests on the QGis Versions *3.16*, *3.22* and the *latest* version.
Until now, it's only possible to test one version at a time.

To do local test runs you can use a [conda installation](https://github.com/opengisch/qgis-conda-builder) of the QGis version you want to test.
#### Linux
On linux machines you can run the tests with your local QGIS installation.

1. Install QGIS and make sure it's available in your currently activated environment.

You will need an ORS-API key. Either set it as an environment variable or do `export ORS_API_KEY=[Your API key here]` before you run the tests.

To run the tests do:
```shell
cd orstools-qgis-plugin
pytest
```

#### Windows
Do all the following steps in a [*WSL*](https://learn.microsoft.com/en-us/windows/wsl/install). To run tests locally you can use a [conda installation](https://github.com/opengisch/qgis-conda-builder) of the QGis version you want to test.
You will also have to install *xvfb* to run the tests on involving an interface.
Lastly, we need [*Pytest*](https://docs.pytest.org/en/8.0.x/) to run tests in general.

To do the above run use these commands:
1. Install a version of anaconda, preferrably [*miniforge*](https://github.com/conda-forge/miniforge).

2. Create and prepare the environment.

```shell
# create environment
mamba create --name qgis_test
# activate envotonment
conda create --name qgis_test
# activate environment
conda activate qgis_test
# install pip
mamba install qgis pip
conda install pip
```

3. Install QGis using mamba.
```shell
mamba install -c conda-forge qgis=[3.16, 3.22, latest] # choose one
conda install -c conda-forge qgis=[3.16, 3.22, latest] # choose one
```

4. Install *xvfb*
Expand Down

0 comments on commit bc26cf6

Please sign in to comment.