From a6a4275cb9ba0003955c4438ff7d701d0b8d32e3 Mon Sep 17 00:00:00 2001 From: Ellen Marie Dash Date: Wed, 30 Dec 2020 17:50:46 -0500 Subject: [PATCH 1/2] Don't run the linters as part of test task. --- .cirrus.yml | 2 +- pyproject.toml | 10 ++++------ tests/test_cmd_aliases.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 3f8b640..2e77dcb 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -97,7 +97,7 @@ FreeBSD_task: - python${PYTHON} -m pip install -e .[testing_only] script: - python${PYTHON} --version - - bork run _test-only + - bork run test # Windows_task: # allow_failures: $CIRRUS_TASK_NAME =~ '.*-rc-.*' diff --git a/pyproject.toml b/pyproject.toml index 4cf1223..4b12f46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,11 +19,9 @@ strip_zipapp_version = true [tool.bork.aliases] # Runs *only* pylint and mypy. (Not the actual tests.) lint = "pytest -k 'pylint or mypy' --pylint --mypy --verbose" -# Runs all tests and pylint. -test = "pytest --pylint --mypy --verbose" -# Runs fast tests, and pylint. -test-fast = "pytest --pylint --mypy --verbose -m 'not slow'" +# Runs all tests. +test = "pytest --verbose" +# Runs fast tests. +test-fast = "pytest --verbose -m 'not slow'" # Runs slow tests. test-slow = "pytest --verbose -m slow" -# Runs fast tests and slow tests, but not pylint. -_test-only = "pytest --verbose" diff --git a/tests/test_cmd_aliases.py b/tests/test_cmd_aliases.py index 692e037..aa95021 100644 --- a/tests/test_cmd_aliases.py +++ b/tests/test_cmd_aliases.py @@ -4,4 +4,4 @@ def test_cmd_aliases(): result = bork_cli("aliases") assert result.exit_code == 0 - assert result.output == 'lint\ntest\ntest-fast\ntest-slow\n_test-only\n' + assert result.output == 'lint\ntest\ntest-fast\ntest-slow\n' From 1b7dee010f7529389d917868abd38289ad45fd5c Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 30 Dec 2020 13:09:55 +0100 Subject: [PATCH 2/2] CI: Do not run tests in the bootstrap task - It is useless, as `python3 /tmp/bork...pyz run test` immediately shells out to pytest, and tests the version of bork that is on the filesystem. - It fails because `git` isn't installed. --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2e77dcb..fe78245 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -44,8 +44,8 @@ Zipapp_bootstrap_task: - cd /tmp/pass3 - cp /tmp/pass2/dist/bork-*.pyz /tmp/bork-pass2.pyz - python3 /tmp/bork-pass2.pyz build - - cp ./dist/bork-*.pyz /tmp/bork-pass3.pyz - - python3 /tmp/bork-pass3.pyz run lint + - '[ -e ./dist/bork-*.pyz ]' + Linux_task: container: