Speed up CI tests on macOS (#3480)

This commit is contained in:
Bruno Alla 2021-12-22 08:14:00 +00:00 committed by GitHub
parent c35779782c
commit 2186caf11d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 13 deletions

View File

@ -60,6 +60,8 @@ jobs:
with:
python-version: "3.9"
cache: pip
- name: Install dependencies
run: pip install -r requirements.txt
- name: Docker ${{ matrix.script.name }}
run: sh tests/test_docker.sh ${{ matrix.script.args }}
@ -99,6 +101,8 @@ jobs:
python-version: "3.9"
cache: pip
cache-dependency-path: '**/requirements*.txt'
- name: Install dependencies
run: pip install -r requirements.txt
- uses: actions/setup-node@v2
with:
node-version: "16"

View File

@ -6,13 +6,6 @@
set -o errexit
set -x
# Install modern pip with new resolver:
# https://blog.python.org/2020/11/pip-20-3-release-new-resolver.html
pip install 'pip>=20.3'
# install test requirements
pip install -r requirements.txt
# create a cache directory
mkdir -p .cache/bare
cd .cache/bare

View File

@ -14,7 +14,11 @@ from cookiecutter.exceptions import FailedHookException
PATTERN = r"{{(\s?cookiecutter)[.](.*?)}}"
RE_OBJ = re.compile(PATTERN)
IS_WINDOWS = sys.platform.startswith("win")
if sys.platform.startswith("win"):
pytest.skip("sh doesn't support windows", allow_module_level=True)
elif sys.platform.startswith("darwin") and os.getenv("CI"):
pytest.skip("skipping slow macOS tests on CI", allow_module_level=True)
@pytest.fixture
@ -157,7 +161,6 @@ def test_project_generation(cookies, context, context_override):
check_paths(paths)
@pytest.mark.skipif(IS_WINDOWS, reason="sh doesn't support windows")
@pytest.mark.parametrize("context_override", SUPPORTED_COMBINATIONS, ids=_fixture_id)
def test_flake8_passes(cookies, context_override):
"""Generated project should pass flake8."""
@ -169,7 +172,6 @@ def test_flake8_passes(cookies, context_override):
pytest.fail(e.stdout.decode())
@pytest.mark.skipif(IS_WINDOWS, reason="sh doesn't support windows")
@pytest.mark.parametrize("context_override", SUPPORTED_COMBINATIONS, ids=_fixture_id)
def test_black_passes(cookies, context_override):
"""Generated project should pass black."""

View File

@ -6,9 +6,6 @@
set -o errexit
set -x
# install test requirements
pip install -r requirements.txt
# create a cache directory
mkdir -p .cache/docker
cd .cache/docker