Commit 27531c1f by Bjorn Neergaard

ci: use Poetry to manage GitHub Actions pytest plugin

Also run the integration and unit tests at the same time.
parent 4072c8a4
......@@ -94,22 +94,16 @@ jobs:
run: poetry run pip install git+https://github.com/pypa/pip.git@fbb7f0b293f1d9289d8c76a556540325b9a172b2
- name: Install dependencies
run: poetry install
run: poetry install --with github-actions
- name: Run mypy
run: poetry run mypy
- name: Install pytest plugin
run: poetry run pip install pytest-github-actions-annotate-failures
- name: Run pytest
run: poetry run pytest -v tests/
- name: Run pytest (integration suite)
env:
POETRY_TEST_INTEGRATION_GIT_USERNAME: ${GITHUB_ACTOR}
POETRY_TEST_INTEGRATION_GIT_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: poetry run pytest -v --integration tests/integration
run: poetry run pytest --integration -v
- name: Get Plugin Version (poetry-plugin-export)
id: poetry-plugin-export-version
......
......@@ -662,6 +662,17 @@ py = "*"
pytest = ">=3.10"
[[package]]
name = "pytest-github-actions-annotate-failures"
version = "0.1.7"
description = "pytest plugin to annotate failed tests with a workflow command for GitHub Actions"
category = "dev"
optional = false
python-versions = "*"
[package.dependencies]
pytest = ">=4.0.0"
[[package]]
name = "pytest-mock"
version = "3.9.0"
description = "Thin-wrapper around the mock package for easier use with pytest"
......@@ -940,7 +951,7 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>=
[metadata]
lock-version = "1.1"
python-versions = "^3.7"
content-hash = "b6d1389de19df902441273b60cf7eff634afbc238151e113dfc5092fc250ef52"
content-hash = "d7ae3f4917162a35d94dee690a627a70505794ba345b39703ba10e08d7064dac"
[metadata.files]
attrs = [
......@@ -1449,6 +1460,10 @@ pytest-forked = [
{file = "pytest-forked-1.4.0.tar.gz", hash = "sha256:8b67587c8f98cbbadfdd804539ed5455b6ed03802203485dd2f53c1422d7440e"},
{file = "pytest_forked-1.4.0-py3-none-any.whl", hash = "sha256:bbbb6717efc886b9d64537b41fb1497cfaf3c9601276be8da2cccfea5a3c8ad8"},
]
pytest-github-actions-annotate-failures = [
{file = "pytest-github-actions-annotate-failures-0.1.7.tar.gz", hash = "sha256:c6af8f9d13f1f09ef4c104a30875a4975db131ddbba979c8e48fdc456c8dde1f"},
{file = "pytest_github_actions_annotate_failures-0.1.7-py2.py3-none-any.whl", hash = "sha256:c4a7346d1d95f731a6b53e9a45f10ca56593978149266dd7526876cce403ea38"},
]
pytest-mock = [
{file = "pytest-mock-3.9.0.tar.gz", hash = "sha256:c899a0dcc8a5f22930acd020b500abd5f956911f326864a3b979e4866e14da82"},
{file = "pytest_mock-3.9.0-py3-none-any.whl", hash = "sha256:1a1b9264224d026932d6685a0f9cef3b61d91563c3e74af9fe5afb2767e13812"},
......
......@@ -94,6 +94,13 @@ types-jsonschema = ">=4.9.0"
types-requests = ">=2.28.8"
typing-extensions = { version = "^4.0.0", python = "<3.8" }
# only used in github actions
[tool.poetry.group.github-actions]
optional = true
[tool.poetry.group.github-actions.dependencies]
pytest-github-actions-annotate-failures = "^0.1.7"
[tool.poetry.scripts]
poetry = "poetry.console.application:main"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment