From d9c9ed047cad78a153a626094cde44562be96f5b Mon Sep 17 00:00:00 2001 From: Mateusz Nojek Date: Wed, 1 Sep 2021 23:01:58 +0200 Subject: [PATCH] Update version.py and update contribution docs (#454) * Update version.py * Add toml dependency to GitHub workflow for publishing package * Update 'Tests' part in CONTRIBUTING.rst --- .github/workflows/python-publish.yml | 2 +- CONTRIBUTING.rst | 18 ++++++++++++++++-- robocop/version.py | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 84c64f789..4b2f6b502 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine + pip install setuptools wheel twine toml python -m pip install robotframework - name: Build and publish env: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 22560d7c5..d3bc91b5e 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -156,7 +156,7 @@ Make sure to run all of the tests before submitting a pull request to be sure that your changes do not break anything. Pull requests are also automatically tested on continuous integration. -Most of our tests use pytest. To use it install robocop with dev profile:: +Most of our tests use pytest. To use it install Robocop with ``dev`` profile:: pip install robocop[dev] @@ -167,6 +167,20 @@ To run pytest tests navigate to directory with test files and run:: Pytest will automatically discover all the tests, run them and display results. Make sure that tests do not fail. +Together with Robocop installed with ``dev`` dependencies, you will be able to use +`tox `_ tool (a CI task automation tool) which can run all tests on different environments. +Currently two environments are available - one with Robot Framework v3.* and one with +Robot Framework v4.*. You can simply run:: + + tox + +and it will run all tests separately in these two environments and display the results. + +If you want to run tests for only one specific environment, you can choose between +``rf3`` and ``rf4`` and run them with option ``-e``, e.g.:: + + tox -e rf3 + Unit tests '''''''''' @@ -183,7 +197,7 @@ You can put one or more \*.robot files inside - it will be autoscanned with ``-- Robocop output will be compared with content of ``expected_output.txt`` file. When updating ``expected_output.txt`` file you can use two macro variables: ``${rules_dir}`` and ``${/}``. -The first is path to rules directory (so the correct path in robocop output will be printed) and the +The first is path to rules directory (so the correct path in Robocop output will be printed) and the second is path separator - \ under Windows and / under Linux. If you wish to use additional configuration or use different that default test data directory follow diff --git a/robocop/version.py b/robocop/version.py index e5102d301..52af183e5 100644 --- a/robocop/version.py +++ b/robocop/version.py @@ -1 +1 @@ -__version__ = '1.9.0' +__version__ = '1.10.0'