From f4dcd935c28e03cbebe339c6128d3ba6a2aa6415 Mon Sep 17 00:00:00 2001 From: al-niessner <1130658+al-niessner@users.noreply.github.com> Date: Sat, 13 Nov 2021 08:07:13 -0800 Subject: [PATCH] Issue 156: move to circle CI (#157) * move from travis to circle The Yaml and concept between circle and travis is completely different. Updated environment variables ans the like. Created a new GHE token with the correct access and it works. --- .ci/check_01.sh | 2 +- .ci/check_02.sh | 2 +- .ci/check_03.sh | 2 +- .ci/check_04.sh | 2 +- .ci/step_00.sh | 7 +------ .ci/util.sh | 6 +++--- .circleci/config.yml | 25 +++++++++++++++++++++++++ 7 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 .circleci/config.yml diff --git a/.ci/check_01.sh b/.ci/check_01.sh index abb5ec73..6386902d 100755 --- a/.ci/check_01.sh +++ b/.ci/check_01.sh @@ -48,7 +48,7 @@ post_state "$context" "$description" "$state" if current_state then - docker run --rm -v $PWD:$PWD -u $UID -w $PWD cit:$(cit_version) pycodestyle \ + docker run --rm -v $PWD:$PWD -u $UID -w $PWD niessner/cit:$(cit_version) pycodestyle \ --ignore=E24,E121,E123,E124,E126,E127,E211,E225,E226,E231,E252,E301,E302,E305,E402,E501,W504,E701,E702,E704,E722,E741 \ --exclude=binding.py \ --statistics Python Test | tee pep8.rpt.txt diff --git a/.ci/check_02.sh b/.ci/check_02.sh index 4ffd97c5..1aa48683 100755 --- a/.ci/check_02.sh +++ b/.ci/check_02.sh @@ -48,7 +48,7 @@ post_state "$context" "$description" "$state" if current_state then - docker run --rm -v $PWD:$PWD -u $UID -w $PWD cit:$(cit_version) pylint --rcfile=.ci/pylint.rc Python/dawgie Test/ae | tee pylint.rpt.txt + docker run --rm -v $PWD:$PWD -u $UID -w $PWD niessner/cit:$(cit_version) pylint --rcfile=.ci/pylint.rc Python/dawgie Test/ae | tee pylint.rpt.txt python3 < .ci/status.txt state=`get_state` fi diff --git a/.ci/check_04.sh b/.ci/check_04.sh index f06b9115..5646f279 100755 --- a/.ci/check_04.sh +++ b/.ci/check_04.sh @@ -46,7 +46,7 @@ post_state "$context" "$description" "$state" if current_state then - docker run --rm -e PYTHONPATH=${PWD}/Python -e USERNAME="$(whoami)" -v $PWD:$PWD -u $UID -w $PWD -i cit:$(cit_version) python3 < /dev/null 2>&1 + ${GHE_API_URL}/repos/${REPO}/statuses/${CIRCLE_SHA1} \ + -d "{\"state\": \"${3}\", \"target_url\": \"${CIRCLE_BUILD_URL}\", \"description\": \"${2}\", \"context\": \"${1}\"}" ##> /dev/null 2>&1 } which_port () diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..f9db3498 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,25 @@ +version: 2.1 +jobs: + build: + machine: # executor type + image: ubuntu-2004:202010-01 + steps: + - checkout + - run: + name: Prepare the machine to run the checks + command: .ci/step_00.sh + - run: + name: PEP-8 compliance + command: .ci/check_01.sh + - run: + name: PyLint compliance + command: .ci/check_02.sh + - run: + name: Unittest compliance + command: .ci/check_03.sh + - run: + name: Legal (licensing) compliance + command: .ci/check_04.sh + - run: + name: Conclude the checks + command: .ci/step_99.sh