From 3ab6948b41c89433f1df18f730d99b5acf2917fb Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Wed, 23 Sep 2020 13:09:07 +0530 Subject: [PATCH 1/8] Testing Travis CI configuration for project Euler --- .travis.yml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a03f8161f13e..87c6149d1966 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,19 +2,35 @@ os: linux dist: focal language: python python: 3.8 +branches: + only: + - config-travis cache: pip before_install: pip install --upgrade pip setuptools six install: pip install black flake8 notifications: webhooks: https://www.travisbuddy.com/ on_success: never -before_script: - - black --check . || true - - flake8 --ignore=E203,W503 --max-complexity=25 --max-line-length=88 --statistics --count . - - scripts/validate_filenames.py # no uppercase, no spaces, in a directory - - pip install -r requirements.txt # fast fail on black, flake8, validate_filenames -script: - - mypy --ignore-missing-imports . - - pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=. . + +jobs: + include: + - name: build + before_script: + - black --check . || true + - flake8 --ignore=E203,W503 --max-complexity=25 --max-line-length=88 --statistics --count . + - scripts/validate_filenames.py # no uppercase, no spaces, in a directory + - pip install -r requirements.txt # fast fail on black, flake8, validate_filenames + script: + - mypy --ignore-missing-imports . + - pytest --doctest-modules --ignore=project_euler/ --durations=10 --cov-report=term-missing:skip-covered --cov=. . + - name: project-euler + before_script: + - black --check project_euler/ || true + - flake8 --ignore=E203,W503 --max-complexity=25 --max-line-length=88 --statistics --count project_euler/ + - scripts/validate_filenames.py + script: + - mypy --ignore-missing-imports project_euler/ + - pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/ + after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md From a99829d3470615922a01b9ff25d5dd4a291139dd Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Wed, 23 Sep 2020 13:19:00 +0530 Subject: [PATCH 2/8] Fix: Installing mypy and pytest-cov for testing --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 87c6149d1966..ffaadbe2ffe3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ branches: - config-travis cache: pip before_install: pip install --upgrade pip setuptools six -install: pip install black flake8 +install: pip install black flake8 mypy pytest-cov notifications: webhooks: https://www.travisbuddy.com/ on_success: never From 818790b84925b8354fbd1bfcbcb946652c90b7a9 Mon Sep 17 00:00:00 2001 From: Dhruv Manilawala Date: Wed, 23 Sep 2020 14:38:34 +0530 Subject: [PATCH 3/8] Remove unnecessary checks for project_euler job --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index ffaadbe2ffe3..85fe5aa6e801 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ os: linux dist: focal language: python python: 3.8 -branches: +branches: # This section will be removed in the last commit only: - config-travis cache: pip @@ -24,12 +24,7 @@ jobs: - mypy --ignore-missing-imports . - pytest --doctest-modules --ignore=project_euler/ --durations=10 --cov-report=term-missing:skip-covered --cov=. . - name: project-euler - before_script: - - black --check project_euler/ || true - - flake8 --ignore=E203,W503 --max-complexity=25 --max-line-length=88 --statistics --count project_euler/ - - scripts/validate_filenames.py script: - - mypy --ignore-missing-imports project_euler/ - pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/ after_success: From 9dadd7cb4cdb026b7a9badcd3ff9e0e34c60c77e Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 23 Sep 2020 14:59:51 +0530 Subject: [PATCH 4/8] Removing branches section --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 85fe5aa6e801..fb437ae6b813 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,9 +2,6 @@ os: linux dist: focal language: python python: 3.8 -branches: # This section will be removed in the last commit - only: - - config-travis cache: pip before_install: pip install --upgrade pip setuptools six install: pip install black flake8 mypy pytest-cov From 630cf4dc26b3c61db2d04c5488249befcd39daa3 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 23 Sep 2020 13:00:50 +0200 Subject: [PATCH 5/8] Update .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fb437ae6b813..1bcffed5a268 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,8 @@ jobs: script: - mypy --ignore-missing-imports . - pytest --doctest-modules --ignore=project_euler/ --durations=10 --cov-report=term-missing:skip-covered --cov=. . - - name: project-euler + - name: Project Euler + before_script: pip install pytest-cov script: - pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/ From b1026da1a494799b0cd5df2a3c08580f32365d63 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 23 Sep 2020 13:01:04 +0200 Subject: [PATCH 6/8] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1bcffed5a268..437c7b0885b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ notifications: jobs: include: - - name: build + - name: Build before_script: - black --check . || true - flake8 --ignore=E203,W503 --max-complexity=25 --max-line-length=88 --statistics --count . From 426473a34897c8dd3ebf7b8d2a89020d401c4520 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 23 Sep 2020 13:01:15 +0200 Subject: [PATCH 7/8] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 437c7b0885b0..b0ffd79ee043 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ language: python python: 3.8 cache: pip before_install: pip install --upgrade pip setuptools six -install: pip install black flake8 mypy pytest-cov +install: pip install black flake8 notifications: webhooks: https://www.travisbuddy.com/ on_success: never From 6f5185719f057ae459fb86e2fc9663428e179d89 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 23 Sep 2020 13:19:51 +0200 Subject: [PATCH 8/8] Update .travis.yml --- .travis.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b0ffd79ee043..cbbdc25e04d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,6 @@ python: 3.8 cache: pip before_install: pip install --upgrade pip setuptools six install: pip install black flake8 -notifications: - webhooks: https://www.travisbuddy.com/ - on_success: never - jobs: include: - name: Build @@ -24,6 +20,8 @@ jobs: before_script: pip install pytest-cov script: - pytest --doctest-modules --durations=10 --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/ - +notifications: + webhooks: https://www.travisbuddy.com/ + on_success: never after_success: - scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md