From a1c1a00f5f5dbb7f8fcddf1f3bf6a19c90e437ba Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 13 Apr 2022 12:15:55 -0400 Subject: [PATCH 1/6] Project: Run pytest in parallel on TravisCI --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f2f2e2fe5..8db807fe6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,8 @@ script: ## Run unit tests and generate coverage data - cd monkey # This is our source dir -- python -m pytest --cov=. # Have to use `python -m pytest` instead of `pytest` to add "{$builddir}/monkey/monkey" to sys.path. +- pip install pytest-xdist +- python -m pytest -n auto --cov=. # Have to use `python -m pytest` instead of `pytest` to add "{$builddir}/monkey/monkey" to sys.path. # Check JS code. The npm install must happen AFTER the flake8 because the node_modules folder will cause a lot of errors. - cd monkey_island/cc/ui From 3478d17755fb4ab81d799c41f2ca846bb3b4d23e Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 13 Apr 2022 12:20:48 -0400 Subject: [PATCH 2/6] Project: Parallelize pynacl build in TravisCI --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8db807fe6..7de7ad260 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ group: travis_latest language: python env: - - PIP_CACHE_DIR=$HOME/.cache/pip PIPENV_CACHE_DIR=$HOME/.cache/pipenv + - PIP_CACHE_DIR=$HOME/.cache/pip PIPENV_CACHE_DIR=$HOME/.cache/pipenv LIBSODIUM_MAKE_ARGS=-j4 cache: - pip @@ -24,6 +24,7 @@ os: linux install: # Python +- nproc - pip install pipenv --upgrade # Install island and monkey requirements as they are needed by UT's - pushd monkey/monkey_island From d1d7495c49887375dcc195ee2114971bf6e099a3 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 13 Apr 2022 12:33:59 -0400 Subject: [PATCH 3/6] Project: Add cores to TravisCI build --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7de7ad260..53fe6cca7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ group: travis_latest language: python env: - - PIP_CACHE_DIR=$HOME/.cache/pip PIPENV_CACHE_DIR=$HOME/.cache/pipenv LIBSODIUM_MAKE_ARGS=-j4 + - PIP_CACHE_DIR=$HOME/.cache/pip PIPENV_CACHE_DIR=$HOME/.cache/pipenv LIBSODIUM_MAKE_ARGS=-j8 cache: - pip @@ -20,6 +20,8 @@ python: - 3.7 os: linux +vm: + size: x-large install: From ffec20643510032ea4e74599352ba5a50a8dfc48 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 13 Apr 2022 12:41:25 -0400 Subject: [PATCH 4/6] Project: Use "pip: true" in TravisCI cache section --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 53fe6cca7..a9683e48b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ env: - PIP_CACHE_DIR=$HOME/.cache/pip PIPENV_CACHE_DIR=$HOME/.cache/pipenv LIBSODIUM_MAKE_ARGS=-j8 cache: - - pip + - pip: true - directories: - "$HOME/.npm" - $PIP_CACHE_DIR From 9ae35beba9a4d446b6dd28b147aa5f0dc25fc734 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 13 Apr 2022 12:42:19 -0400 Subject: [PATCH 5/6] Project: Add npm caching strategy to TravisCI --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a9683e48b..fb2a36edc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ env: cache: - pip: true + - npm: true - directories: - "$HOME/.npm" - $PIP_CACHE_DIR From 3240e32e939326a00636175749d13340df38a4c9 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 13 Apr 2022 12:43:05 -0400 Subject: [PATCH 6/6] Project: Upgrade NodeJS from 12 -> 16 in TravisCI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fb2a36edc..f1bf98865 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,7 +41,7 @@ install: - node --version - npm --version - nvm --version -- nvm install 12 +- nvm install 16 - nvm use node - npm i -g eslint - node --version