From 892f0f8809151ae740b75bf72b52885382693b69 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 09:51:09 -0700 Subject: [PATCH 01/22] add test/coverage.json --- .circleci/config.yml | 14 ++++++++++++-- tests/coverage.json | 3 +++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 tests/coverage.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 087d81e..26abc94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ aliases: conda config --set always_yes yes --set changeps1 no conda update -y -q conda conda config --set anaconda_upload no - conda create -n py3 -c cdat/label/nightly -c conda-forge -c cdat genutil nose flake8 "numpy=1.14" "python>3" cdat_info testsrunner + conda create -n py3 -c cdat/label/linatest -c cdat/label/nightly -c conda-forge -c cdat genutil nose flake8 "numpy=1.14" "python>3" cdat_info testsrunner coverage coveralls conda create -n py2 -c cdat/label/nightly -c conda-forge -c cdat genutil nose flake8 "numpy=1.14" "python<3" cdat_info testsrunner - &setup_cdutil @@ -45,7 +45,7 @@ aliases: RESULT=$? echo "*** py2 test result: "${RESULT} source activate py3 - python run_tests.py -v2 -H + python run_tests.py -v2 -H $COVERAGE PY3_RESULT=$? echo "*** py3 test result: "${PY3_RESULT} RESULT=$(( $RESULT + $PY3_RESULT)) @@ -72,6 +72,14 @@ aliases: conda build $PKG_NAME -c cdat/label/nightly -c conda-forge -c cdat --python=3.6 anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l $LABEL $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION.`date +%Y*`0.tar.bz2 --force + - &run_coveralls + name: run_coveralls + command: | + export PATH=$WORKDIR/miniconda/bin:$PATH + source activate py3 + coveralls + source deactivate + jobs: macos_cdutil: macos: @@ -96,12 +104,14 @@ jobs: environment: WORKDIR: "workspace/test_linux_cdutil" OS: "linux-64" + COVERAGE: "-c" steps: - checkout - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil - run: *run_cdutil_tests + - run: *run_coveralls - run: *conda_upload - store_artifacts: path: tests_html diff --git a/tests/coverage.json b/tests/coverage.json new file mode 100644 index 0000000..3173a04 --- /dev/null +++ b/tests/coverage.json @@ -0,0 +1,3 @@ +{ + "include": ["cdutil", "cdms2", "genutil", "cdat_info", "testsrunner"] +} From 4d0eff3e007576e9729afda2f3484b82bf8cae14 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 10:09:12 -0700 Subject: [PATCH 02/22] only collect cdutil coverage --- tests/coverage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/coverage.json b/tests/coverage.json index 3173a04..06748f0 100644 --- a/tests/coverage.json +++ b/tests/coverage.json @@ -1,3 +1,3 @@ { - "include": ["cdutil", "cdms2", "genutil", "cdat_info", "testsrunner"] + "include": ["cdutil"] } From d0d26204d18508d9954fdc6e322e8292f105fc3f Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 11:15:30 -0700 Subject: [PATCH 03/22] remove tests/coverage.json --- tests/coverage.json | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 tests/coverage.json diff --git a/tests/coverage.json b/tests/coverage.json deleted file mode 100644 index 06748f0..0000000 --- a/tests/coverage.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "include": ["cdutil"] -} From 5195be2f726350a025990558f242470cfdc1c6f2 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 15:06:24 -0700 Subject: [PATCH 04/22] workdir should be the directory where run_tests.py is --- run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index c6724c3..5761428 100644 --- a/run_tests.py +++ b/run_tests.py @@ -5,7 +5,7 @@ test_suite_name = 'cdutil' -workdir = os.getcwd() +workdir = os.path.dirname(os.path.realpath(__file__)) runner = cdat_info.TestRunnerBase(test_suite_name, get_sample_data=True) ret_code = runner.run(workdir) From 2a010c0b8cd25f092f7fc4559e1fc44ef673a14e Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 15:31:10 -0700 Subject: [PATCH 05/22] try add path to checkout --- .circleci/config.yml | 6 ++++-- run_tests.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26abc94..fd637f4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -88,7 +88,8 @@ jobs: WORKDIR: "workspace/test_macos_cdutil" OS: "osx-64" steps: - - checkout + - checkout: + path: $CIRCLE_WORKING_DIRECTORY/cdutil - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil @@ -106,7 +107,8 @@ jobs: OS: "linux-64" COVERAGE: "-c" steps: - - checkout + - checkout: + path: $CIRCLE_WORKING_DIRECTORY/cdutil - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil diff --git a/run_tests.py b/run_tests.py index 5761428..c6724c3 100644 --- a/run_tests.py +++ b/run_tests.py @@ -5,7 +5,7 @@ test_suite_name = 'cdutil' -workdir = os.path.dirname(os.path.realpath(__file__)) +workdir = os.getcwd() runner = cdat_info.TestRunnerBase(test_suite_name, get_sample_data=True) ret_code = runner.run(workdir) From 978bb64c0472f91441f3dd7d45919fba61d3e090 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 15:39:57 -0700 Subject: [PATCH 06/22] try add path to checkout --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd637f4..c9e9967 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,6 +28,7 @@ aliases: command: | export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False + cd $CIRCLE_WORKING_DIRECTORY/cdutil source activate py3 python setup.py install source activate py2 @@ -39,6 +40,7 @@ aliases: command: | export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False + cd $CIRCLE_WORKING_DIRECTORY/cdutil set -e source activate py2 python run_tests.py -v2 -H @@ -76,6 +78,7 @@ aliases: name: run_coveralls command: | export PATH=$WORKDIR/miniconda/bin:$PATH + cd $CIRCLE_WORKING_DIRECTORY/cdutil source activate py3 coveralls source deactivate From 643d374749f233ba3678f3ab688473916261565f Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 15:48:34 -0700 Subject: [PATCH 07/22] try add path to checkout --- .circleci/config.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c9e9967..6e1309c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,12 @@ checkout: aliases: + - &init + name: init + command: | + mkdir $CIRCLE_WORKING_DIRECTORY/cdutil + cd $CIRCLE_WORKING_DIRECTORY/cdutil + - &setup_miniconda name: setup_miniconda command: | @@ -91,8 +97,8 @@ jobs: WORKDIR: "workspace/test_macos_cdutil" OS: "osx-64" steps: - - checkout: - path: $CIRCLE_WORKING_DIRECTORY/cdutil + - run: *init + - checkout - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil @@ -110,8 +116,8 @@ jobs: OS: "linux-64" COVERAGE: "-c" steps: - - checkout: - path: $CIRCLE_WORKING_DIRECTORY/cdutil + - run: *init + - checkout - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil From 5b358b9778372d4cd24f2bcc3f9bee38ae681e24 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 15:53:51 -0700 Subject: [PATCH 08/22] try add path to checkout --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e1309c..8c8b9d5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ aliases: - &init name: init command: | - mkdir $CIRCLE_WORKING_DIRECTORY/cdutil + mkdir -p $CIRCLE_WORKING_DIRECTORY/cdutil cd $CIRCLE_WORKING_DIRECTORY/cdutil - &setup_miniconda From 8799e8346f04879fc55013be5e1b634a0d310ba6 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 15:56:51 -0700 Subject: [PATCH 09/22] try add path to checkout --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8c8b9d5..237096a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,7 +98,8 @@ jobs: OS: "osx-64" steps: - run: *init - - checkout + - checkout: + path: $CIRCLE_WORKING_DIRECTORY/cdutil - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil @@ -117,7 +118,8 @@ jobs: COVERAGE: "-c" steps: - run: *init - - checkout + - checkout: + path: $CIRCLE_WORKING_DIRECTORY/cdutil - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil From 6525f4ef35a03212e9e434487b29f87e8601225d Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 16:09:34 -0700 Subject: [PATCH 10/22] only collect cdutil coverage --- .circleci/config.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 237096a..58ffdfb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,12 +6,6 @@ checkout: aliases: - - &init - name: init - command: | - mkdir -p $CIRCLE_WORKING_DIRECTORY/cdutil - cd $CIRCLE_WORKING_DIRECTORY/cdutil - - &setup_miniconda name: setup_miniconda command: | @@ -34,7 +28,6 @@ aliases: command: | export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False - cd $CIRCLE_WORKING_DIRECTORY/cdutil source activate py3 python setup.py install source activate py2 @@ -46,7 +39,6 @@ aliases: command: | export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False - cd $CIRCLE_WORKING_DIRECTORY/cdutil set -e source activate py2 python run_tests.py -v2 -H @@ -97,9 +89,8 @@ jobs: WORKDIR: "workspace/test_macos_cdutil" OS: "osx-64" steps: - - run: *init - checkout: - path: $CIRCLE_WORKING_DIRECTORY/cdutil + path: $WORKDIR/cdutil - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil @@ -117,9 +108,8 @@ jobs: OS: "linux-64" COVERAGE: "-c" steps: - - run: *init - checkout: - path: $CIRCLE_WORKING_DIRECTORY/cdutil + path: $WORKDIR/cdutil - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil From d2abcbaa18fb9c5757e2910fcd47072ab7902cc1 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 16:15:18 -0700 Subject: [PATCH 11/22] try add path to checkout --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 58ffdfb..cf38782 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,6 +28,7 @@ aliases: command: | export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False + cd $WORKDIR/cdutil source activate py3 python setup.py install source activate py2 @@ -40,6 +41,7 @@ aliases: export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False set -e + cd $WORKDIR/cdutil source activate py2 python run_tests.py -v2 -H RESULT=$? From 79f4d6b67b460305a12cd9252b9f9bd8e4302d7e Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 16:47:16 -0700 Subject: [PATCH 12/22] add tests/coverage.json --- .circleci/config.yml | 9 ++------- tests/coverage.json | 3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) create mode 100644 tests/coverage.json diff --git a/.circleci/config.yml b/.circleci/config.yml index cf38782..26abc94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -28,7 +28,6 @@ aliases: command: | export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False - cd $WORKDIR/cdutil source activate py3 python setup.py install source activate py2 @@ -41,7 +40,6 @@ aliases: export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False set -e - cd $WORKDIR/cdutil source activate py2 python run_tests.py -v2 -H RESULT=$? @@ -78,7 +76,6 @@ aliases: name: run_coveralls command: | export PATH=$WORKDIR/miniconda/bin:$PATH - cd $CIRCLE_WORKING_DIRECTORY/cdutil source activate py3 coveralls source deactivate @@ -91,8 +88,7 @@ jobs: WORKDIR: "workspace/test_macos_cdutil" OS: "osx-64" steps: - - checkout: - path: $WORKDIR/cdutil + - checkout - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil @@ -110,8 +106,7 @@ jobs: OS: "linux-64" COVERAGE: "-c" steps: - - checkout: - path: $WORKDIR/cdutil + - checkout - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil diff --git a/tests/coverage.json b/tests/coverage.json new file mode 100644 index 0000000..3173a04 --- /dev/null +++ b/tests/coverage.json @@ -0,0 +1,3 @@ +{ + "include": ["cdutil", "cdms2", "genutil", "cdat_info", "testsrunner"] +} From e4208983d5b7b509881c08c8b52bdcc3d138c659 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 17 Aug 2018 16:59:06 -0700 Subject: [PATCH 13/22] add tests/coverage.json --- tests/coverage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/coverage.json b/tests/coverage.json index 3173a04..06748f0 100644 --- a/tests/coverage.json +++ b/tests/coverage.json @@ -1,3 +1,3 @@ { - "include": ["cdutil", "cdms2", "genutil", "cdat_info", "testsrunner"] + "include": ["cdutil"] } From 4cae180b53f93572495d425a88e7878ca91dfb92 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Mon, 20 Aug 2018 10:22:36 -0700 Subject: [PATCH 14/22] retest coverage --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26abc94..a3729ea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ aliases: source activate py2 python run_tests.py -v2 -H RESULT=$? - echo "*** py2 test result: "${RESULT} + echo "**** py2 test result: "${RESULT} source activate py3 python run_tests.py -v2 -H $COVERAGE PY3_RESULT=$? From 97e5a03367900c559ab5481dcf1aef3a6cf45c80 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Thu, 30 Aug 2018 14:15:08 -0700 Subject: [PATCH 15/22] relaunch tests on circleci --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a3729ea..26abc94 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ aliases: source activate py2 python run_tests.py -v2 -H RESULT=$? - echo "**** py2 test result: "${RESULT} + echo "*** py2 test result: "${RESULT} source activate py3 python run_tests.py -v2 -H $COVERAGE PY3_RESULT=$? From b11ec123925fc4da05abc4459f2956cbd21553bc Mon Sep 17 00:00:00 2001 From: Muryanto Date: Thu, 30 Aug 2018 14:22:39 -0700 Subject: [PATCH 16/22] in .circleci/config.yml, when running tests with coverage, needs to specify run_tests -c tests/coverage.json --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26abc94..e414af6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -104,7 +104,7 @@ jobs: environment: WORKDIR: "workspace/test_linux_cdutil" OS: "linux-64" - COVERAGE: "-c" + COVERAGE: "-c tests/coverage.json" steps: - checkout - run: *setup_miniconda From e52a92346843b217d20e0af8f6966041f6820935 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Thu, 30 Aug 2018 16:12:11 -0700 Subject: [PATCH 17/22] revisit .circleci/config.yml to create conda env for py2, run tests, and only if py2 tests are passing, we proceed to py3 --- .circleci/config.yml | 87 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e414af6..25ae2ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,24 +15,28 @@ aliases: - &create_conda_env name: create_conda_env + environment: + PKGS: "genutil nose flake8 'numpy=1.14' cdat_info testsrunner" command: | export PATH=$WORKDIR/miniconda/bin:$PATH conda config --set always_yes yes --set changeps1 no conda update -y -q conda conda config --set anaconda_upload no - conda create -n py3 -c cdat/label/linatest -c cdat/label/nightly -c conda-forge -c cdat genutil nose flake8 "numpy=1.14" "python>3" cdat_info testsrunner coverage coveralls - conda create -n py2 -c cdat/label/nightly -c conda-forge -c cdat genutil nose flake8 "numpy=1.14" "python<3" cdat_info testsrunner + if [ $PY_VER = "py2" ] + then + conda create -n py2 -c cdat/label/nightly -c conda-forge -c cdat $PKGS "python<3" + else + conda create -n py3 -c cdat/label/linatest -c cdat/label/nightly -c conda-forge -c cdat $PKGS "python>3" coverage coveralls + fi - &setup_cdutil name: setup_cdutil command: | export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False - source activate py3 + source activate $PY_VER python setup.py install - source activate py2 rm -rf build - python setup.py install - &run_cdutil_tests name: run_cdutil_tests @@ -40,15 +44,10 @@ aliases: export PATH=$WORKDIR/miniconda/bin:$PATH export UVCDAT_ANONYMOUS_LOG=False set -e - source activate py2 - python run_tests.py -v2 -H + source activate $PY_VER + python run_tests.py -v2 -H $COVERAGE RESULT=$? - echo "*** py2 test result: "${RESULT} - source activate py3 - python run_tests.py -v2 -H $COVERAGE - PY3_RESULT=$? - echo "*** py3 test result: "${PY3_RESULT} - RESULT=$(( $RESULT + $PY3_RESULT)) + echo "*** $PY_VER test result: "${RESULT} exit $RESULT - &conda_upload @@ -76,34 +75,73 @@ aliases: name: run_coveralls command: | export PATH=$WORKDIR/miniconda/bin:$PATH - source activate py3 + source activate $PY_VER coveralls source deactivate jobs: - macos_cdutil: + macos_cdutil_py2: + macos: + xcode: "9.2.0" + environment: + WORKDIR: "workspace/test_macos_cdutil_py2" + OS: "osx-64" + PY_VER: "py2" + steps: + - checkout + - run: *setup_miniconda + - run: *create_conda_env + - run: *setup_cdutil + - run: *run_cdutil_tests + - run: *conda_upload + - store_artifacts: + path: tests_html + destination: tests_html + + macos_cdutil_py3: macos: xcode: "9.2.0" environment: - WORKDIR: "workspace/test_macos_cdutil" + WORKDIR: "workspace/test_macos_cdutil_py3" OS: "osx-64" + PY_VER: "py3" + steps: + - checkout + - run: *setup_miniconda + - run: *create_conda_env + - run: *setup_cdutil + - run: *run_cdutil_tests + - run: *conda_upload + - store_artifacts: + path: tests_html + destination: tests_html + + linux_cdutil_py2: + machine: + image: circleci/classic:latest + environment: + WORKDIR: "workspace/test_linux_cdutil_py2" + OS: "linux-64" + PY_VER: "py2" steps: - checkout - run: *setup_miniconda - run: *create_conda_env - run: *setup_cdutil - run: *run_cdutil_tests + - run: *run_coveralls - run: *conda_upload - store_artifacts: path: tests_html destination: tests_html - linux_cdutil: + linux_cdutil_py3: machine: image: circleci/classic:latest environment: - WORKDIR: "workspace/test_linux_cdutil" + WORKDIR: "workspace/test_linux_cdutil_py3" OS: "linux-64" + PY_VER: "py3" COVERAGE: "-c tests/coverage.json" steps: - checkout @@ -121,7 +159,16 @@ workflows: version: 2 cdutil: jobs: - - macos_cdutil - - linux_cdutil + - macos_cdutil_py2 + - macos_cdutil_py3: + requires: + - macos_cdutil_py2 + - linux_cdutil_py2 + - linux_cdutil_py3: + requires: + - linux_cdutil_py2 + + + \ No newline at end of file From 15faabc62d43c72cada82315e4e8845c79352faa Mon Sep 17 00:00:00 2001 From: Muryanto Date: Thu, 30 Aug 2018 16:24:25 -0700 Subject: [PATCH 18/22] revisit .circleci/config.yml to create conda env for py2, run tests, and only if py2 tests are passing, we proceed to py3 -- only run coveralls for linux_nightly_py3 --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25ae2ae..0e839ee 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -129,7 +129,6 @@ jobs: - run: *create_conda_env - run: *setup_cdutil - run: *run_cdutil_tests - - run: *run_coveralls - run: *conda_upload - store_artifacts: path: tests_html From 2e6740fb82371c0f7e9702c92e3c7b9f4d6b90b7 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Tue, 4 Sep 2018 12:36:36 -0700 Subject: [PATCH 19/22] add coverage -- cleanup .circleci/config.yml --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0e839ee..89dad01 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,14 +26,14 @@ aliases: then conda create -n py2 -c cdat/label/nightly -c conda-forge -c cdat $PKGS "python<3" else - conda create -n py3 -c cdat/label/linatest -c cdat/label/nightly -c conda-forge -c cdat $PKGS "python>3" coverage coveralls + conda create -n py3 -c cdat/label/nightly -c conda-forge -c cdat $PKGS "python>3" coverage coveralls fi - &setup_cdutil name: setup_cdutil command: | export PATH=$WORKDIR/miniconda/bin:$PATH - export UVCDAT_ANONYMOUS_LOG=False + export CDAT_ANONYMOUS_LOG=False source activate $PY_VER python setup.py install rm -rf build @@ -42,7 +42,7 @@ aliases: name: run_cdutil_tests command: | export PATH=$WORKDIR/miniconda/bin:$PATH - export UVCDAT_ANONYMOUS_LOG=False + export CDAT_ANONYMOUS_LOG=False set -e source activate $PY_VER python run_tests.py -v2 -H $COVERAGE From 5829734124906be27242b39af37b03994c8e697a Mon Sep 17 00:00:00 2001 From: Muryanto Date: Tue, 4 Sep 2018 14:51:54 -0700 Subject: [PATCH 20/22] fixed typo in .circleci/config.yml and cleanup --- .circleci/config.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 89dad01..b8a4f6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,16 +17,16 @@ aliases: name: create_conda_env environment: PKGS: "genutil nose flake8 'numpy=1.14' cdat_info testsrunner" + CHANNELS: "-c cdat/label/nightly -c conda-forge -c cdat" command: | export PATH=$WORKDIR/miniconda/bin:$PATH conda config --set always_yes yes --set changeps1 no conda update -y -q conda conda config --set anaconda_upload no - if [ $PY_VER = "py2" ] - then - conda create -n py2 -c cdat/label/nightly -c conda-forge -c cdat $PKGS "python<3" + if [[ $PY_VER = "py2" ]]; then + conda create -n $PY_VER $PKGS "python<3" else - conda create -n py3 -c cdat/label/nightly -c conda-forge -c cdat $PKGS "python>3" coverage coveralls + conda create -n $PY_VER $PKGS "python>3" coverage coveralls fi - &setup_cdutil @@ -52,6 +52,8 @@ aliases: - &conda_upload name: conda_upload + environment: + CHANNELS: "-c cdat/label/nightly -c conda-forge -c cdat" command: | if [[ $CIRCLE_BRANCH != 'master' ]]; then exit 0 @@ -67,8 +69,11 @@ aliases: export VERSION=8.0 export LABEL=nightly python ./prep_for_build.py -l $VERSION - conda build $PKG_NAME -c cdat/label/nightly -c conda-forge -c cdat - conda build $PKG_NAME -c cdat/label/nightly -c conda-forge -c cdat --python=3.6 + if [[ $PY_VER = 'py2' ]]; then + conda build $PKG_NAME $CHANNELS + else + conda build $PKG_NAME $CHANNELS --python=3.6 + fi anaconda -t $CONDA_UPLOAD_TOKEN upload -u $USER -l $LABEL $CONDA_BLD_PATH/$OS/$PKG_NAME-$VERSION.`date +%Y*`0.tar.bz2 --force - &run_coveralls From 7a8cd579aac863a09e9f8cb7a4f338a0e47f21d8 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Tue, 4 Sep 2018 15:06:59 -0700 Subject: [PATCH 21/22] fixed conda create -- was missing channels --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b8a4f6a..358b9f9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,9 +24,9 @@ aliases: conda update -y -q conda conda config --set anaconda_upload no if [[ $PY_VER = "py2" ]]; then - conda create -n $PY_VER $PKGS "python<3" + conda create -n $PY_VER $CHANNELS $PKGS "python<3" else - conda create -n $PY_VER $PKGS "python>3" coverage coveralls + conda create -n $PY_VER $CHANNELS $PKGS "python>3" coverage coveralls fi - &setup_cdutil From e92428e8a86320feef15771077c3b6558eea6e60 Mon Sep 17 00:00:00 2001 From: Muryanto Date: Fri, 7 Sep 2018 10:00:08 -0700 Subject: [PATCH 22/22] add --depth 1 when cloning cdat/cdat repo --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 358b9f9..318618b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ aliases: name: setup_miniconda command: | mkdir -p workspace - git clone -b validateNightly git@github.com:CDAT/cdat workspace/cdat + git clone -b validateNightly --depth 1 git@github.com:CDAT/cdat workspace/cdat python workspace/cdat/scripts/install_miniconda.py -w $WORKDIR -p 'py3' - &create_conda_env