From f67514e5ffdbe0141b91c88366ff5233e0293ca2 Mon Sep 17 00:00:00 2001 From: Nejc Habjan Date: Mon, 22 Aug 2022 21:01:50 +0200 Subject: chore(ci): make pytest annotations work --- .github/workflows/test.yml | 6 +++--- requirements-test.txt | 1 + tox.ini | 11 ++++++++++- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0cbe44a..50c7923 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -51,7 +51,7 @@ jobs: with: python-version: ${{ matrix.python.version }} - name: Install dependencies - run: pip3 install tox pytest-github-actions-annotate-failures + run: pip install tox - name: Run tests env: TOXENV: ${{ matrix.python.toxenv }} @@ -69,7 +69,7 @@ jobs: with: python-version: "3.10" - name: Install dependencies - run: pip install tox pytest-github-actions-annotate-failures + run: pip install tox - name: Run tests env: TOXENV: ${{ matrix.toxenv }} @@ -90,7 +90,7 @@ jobs: with: python-version: "3.10" - name: Install dependencies - run: pip install tox pytest-github-actions-annotate-failures + run: pip install tox - name: Run tests env: PY_COLORS: 1 diff --git a/requirements-test.txt b/requirements-test.txt index 6265bd8..f378200 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -2,5 +2,6 @@ coverage pytest==7.1.2 pytest-console-scripts==1.3.1 pytest-cov +pytest-github-actions-annotate-failures==0.1.7 PyYaml>=5.2 responses diff --git a/tox.ini b/tox.ini index aafef8e..6544d35 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,16 @@ skip_missing_interpreters = True envlist = py310,py39,py38,py37,flake8,black,twine-check,mypy,isort,cz,pylint [testenv] -passenv = GITLAB_IMAGE GITLAB_TAG PY_COLORS NO_COLOR FORCE_COLOR DOCKER_HOST PWD +passenv = + DOCKER_HOST + FORCE_COLOR + GITHUB_ACTIONS + GITHUB_WORKSPACE + GITLAB_IMAGE + GITLAB_TAG + NO_COLOR + PWD + PY_COLORS setenv = VIRTUAL_ENV={envdir} whitelist_externals = true usedevelop = True -- cgit v1.2.1