diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index be5f6439..dbd5eabf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,11 +32,11 @@ jobs: ostree \ python3-gi \ python3-pip - - name: Python dependencies - run: | - python3 -m pip install flake8 pytest - name: Checkout uses: actions/checkout@v2 + - name: Python dependencies + run: | + python3 -m pip install -r requirements-test.txt - name: Lint run: | python3 -m flake8 diff --git a/README.md b/README.md index 8238d41a..2cc4f885 100644 --- a/README.md +++ b/README.md @@ -394,8 +394,9 @@ Testing ======= Some parts of the image builder can be tested with [pytest][pytest-url]. -After installing pytest, run `pytest` (or `pytest-3` if `pytest` is for -python 2) from the root of the checkout. +Install the testing dependencies with `pip3 install -r +requirements-test.txt`. After installing pytest, run `pytest` (or +`pytest-3` if `pytest` is for python 2) from the root of the checkout. Various options can be passed to `pytest` to control how the tests are run. See the pytest [usage][pytest-usage] documentation for details. diff --git a/requirements-test.txt b/requirements-test.txt new file mode 100644 index 00000000..4b5e87ba --- /dev/null +++ b/requirements-test.txt @@ -0,0 +1,3 @@ +# Python requirements for testing +flake8 +pytest