From f5e2880fa9b0248ad4d53b012cfd50ff6f29a496 Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 12:52:41 +0300 Subject: [PATCH 01/10] Moving to GitHub Actions. --- .github/workflows/main.yml | 36 ++++++++++++++++++++++++++++++++++++ .travis.yml | 38 -------------------------------------- 2 files changed, 36 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000000..7dd61f631a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,36 @@ +name: CI +on: + push: + branches: + - 'master' + - 'develop' + pull_request: + branches: + - '*' +jobs: + build_and_tests: + strategy: + fail-fast: false + matrix: + python-version: ['3.6', '3.7', '3.8'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Installing python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Installing dependencies + - run: | + pip install coverage tensorflow + pip install -e ./ + - name: Measuring code coverage + run: | + coverage run -m unittest discover -v + coverage run -a datum.py -h + coverage xml + bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml + - name: Unit testing + run: | + python -m unittest discover -v + datum -h diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6b9f252237..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -language: python - -cache: pip - -python: - - '3.6' - - '3.7' - - '3.8' - -matrix: - include: - - dist: xenial - - # measure coverage here - - dist: bionic - python: '3.6' - before_install: - - pip install coverage - script: - - coverage run -m unittest discover -v - - coverage run -a datum.py -h - after_success: - - coverage xml - - bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml - - - dist: bionic - python: '3.7' - - dist: bionic - python: '3.8' - -install: - - pip install -e ./ - - pip install tensorflow - - pip install pandas - -script: - - python -m unittest discover -v - - datum -h \ No newline at end of file From a4bf09fe846a7bbf6dbb2e13b92fe0019bf760c5 Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 12:55:59 +0300 Subject: [PATCH 02/10] Fix CI error --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7dd61f631a..c75b7ff906 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,7 +21,7 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Installing dependencies - - run: | + run: | pip install coverage tensorflow pip install -e ./ - name: Measuring code coverage From a32e2e75f568ebed6f70bec804d416050e992616 Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 13:33:11 +0300 Subject: [PATCH 03/10] Check Coveralls --- .github/workflows/main.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c75b7ff906..e276bdda1a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ on: branches: - '*' jobs: - build_and_tests: + build_and_tests_on_python: strategy: fail-fast: false matrix: @@ -22,15 +22,16 @@ jobs: python-version: ${{ matrix.python-version }} - name: Installing dependencies run: | - pip install coverage tensorflow + pip install coveralls tensorflow pip install -e ./ - - name: Measuring code coverage - run: | - coverage run -m unittest discover -v - coverage run -a datum.py -h - coverage xml - bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml - name: Unit testing run: | python -m unittest discover -v datum -h + - name: Code instrumentation + env: + github-token: ${{ secrets.GITHUB_TOKEN }} + run: | + coverage run -m unittest discover -v + coverage run -a datum.py -h + coveralls From 0d41d04777243ec2fb0e50939efefcb32c70a4ca Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 13:39:11 +0300 Subject: [PATCH 04/10] Fix env --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e276bdda1a..dd2f589a83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,7 +30,7 @@ jobs: datum -h - name: Code instrumentation env: - github-token: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | coverage run -m unittest discover -v coverage run -a datum.py -h From 198c2588960f6aa96b995b866dcb86c7819134c7 Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 14:01:18 +0300 Subject: [PATCH 05/10] Fix env --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd2f589a83..4eaafe4d16 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,7 @@ jobs: datum -h - name: Code instrumentation env: + COVERALLS_SERVICE_NAME: github GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | coverage run -m unittest discover -v From da51fd77b9f571165fbf8b0522716dae7a080ae7 Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 15:18:45 +0300 Subject: [PATCH 06/10] Check codacy --- .github/workflows/main.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4eaafe4d16..6bf0853c5f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,17 +22,25 @@ jobs: python-version: ${{ matrix.python-version }} - name: Installing dependencies run: | - pip install coveralls tensorflow + pip install coverage tensorflow pip install -e ./ - name: Unit testing run: | python -m unittest discover -v datum -h - name: Code instrumentation - env: - COVERALLS_SERVICE_NAME: github - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | coverage run -m unittest discover -v coverage run -a datum.py -h - coveralls + coverage xml + - name: Run codacy-coverage-reporter + uses: codacy/codacy-coverage-reporter-action@v1 + with: + project-token: ${{ secrets.GITHUB_TOKEN }} + coverage-reports: coverage.xml + # - name: Sending coverage results + # env: + # COVERALLS_SERVICE_NAME: github + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: | + # coveralls From 871744f74077935891252c31bb01c150c76d49eb Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 15:52:15 +0300 Subject: [PATCH 07/10] Split pr and push --- .github/workflows/pull_request.yml | 23 +++++++++++++++++++++++ .github/workflows/{main.yml => push.yml} | 20 ++++---------------- 2 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/pull_request.yml rename .github/workflows/{main.yml => push.yml} (64%) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml new file mode 100644 index 0000000000..5055dfb6df --- /dev/null +++ b/.github/workflows/pull_request.yml @@ -0,0 +1,23 @@ +name: CI_pull_request +on: pull_request +jobs: + build_and_tests_on_python: + strategy: + fail-fast: false + matrix: + python-version: ['3.6', '3.7', '3.8', '3.9'] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Installing python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Installing dependencies + run: | + pip install coverage tensorflow + pip install -e ./ + - name: Unit testing + run: | + python -m unittest discover -v + datum -h diff --git a/.github/workflows/main.yml b/.github/workflows/push.yml similarity index 64% rename from .github/workflows/main.yml rename to .github/workflows/push.yml index 6bf0853c5f..22b3c5c2ed 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/push.yml @@ -1,18 +1,16 @@ -name: CI +name: CI_push on: push: branches: - 'master' - 'develop' - pull_request: - branches: - - '*' + - 'develop-tmp' jobs: build_and_tests_on_python: strategy: fail-fast: false matrix: - python-version: ['3.6', '3.7', '3.8'] + python-version: ['3.6', '3.7', '3.8', '3.9'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -24,10 +22,6 @@ jobs: run: | pip install coverage tensorflow pip install -e ./ - - name: Unit testing - run: | - python -m unittest discover -v - datum -h - name: Code instrumentation run: | coverage run -m unittest discover -v @@ -36,11 +30,5 @@ jobs: - name: Run codacy-coverage-reporter uses: codacy/codacy-coverage-reporter-action@v1 with: - project-token: ${{ secrets.GITHUB_TOKEN }} + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} coverage-reports: coverage.xml - # - name: Sending coverage results - # env: - # COVERALLS_SERVICE_NAME: github - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # coveralls From 21b7b9ac40f69be561ba276ab6e31af664d78bee Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 16:02:01 +0300 Subject: [PATCH 08/10] Rework configs --- .github/workflows/{push.yml => coverage.yml} | 3 +-- .github/workflows/{pull_request.yml => main.yml} | 12 +++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) rename .github/workflows/{push.yml => coverage.yml} (96%) rename .github/workflows/{pull_request.yml => main.yml} (80%) diff --git a/.github/workflows/push.yml b/.github/workflows/coverage.yml similarity index 96% rename from .github/workflows/push.yml rename to .github/workflows/coverage.yml index 22b3c5c2ed..d97dfed5d8 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/coverage.yml @@ -1,8 +1,7 @@ -name: CI_push +name: Coverage on: push: branches: - - 'master' - 'develop' - 'develop-tmp' jobs: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/main.yml similarity index 80% rename from .github/workflows/pull_request.yml rename to .github/workflows/main.yml index 5055dfb6df..5689e72d74 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/main.yml @@ -1,5 +1,11 @@ -name: CI_pull_request -on: pull_request +name: CI +on: + push: + branches: + - 'master' + pull_request: + branches: + - '*' jobs: build_and_tests_on_python: strategy: @@ -15,7 +21,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Installing dependencies run: | - pip install coverage tensorflow + pip install tensorflow pip install -e ./ - name: Unit testing run: | From d635e5864dc61619ae45828240b9362ef208d462 Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 16:05:28 +0300 Subject: [PATCH 09/10] Minor reworks --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d97dfed5d8..9bf7b33f20 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -5,7 +5,7 @@ on: - 'develop' - 'develop-tmp' jobs: - build_and_tests_on_python: + coverage_tests_on_python: strategy: fail-fast: false matrix: From 33a18d4b97c09c7a043dcc5f6e8b059ec71e308c Mon Sep 17 00:00:00 2001 From: dvkruchinin Date: Mon, 31 May 2021 16:41:15 +0300 Subject: [PATCH 10/10] Rework sending results --- .github/workflows/coverage.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 9bf7b33f20..9fc2c1284d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -26,8 +26,6 @@ jobs: coverage run -m unittest discover -v coverage run -a datum.py -h coverage xml - - name: Run codacy-coverage-reporter - uses: codacy/codacy-coverage-reporter-action@v1 - with: - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} - coverage-reports: coverage.xml + - name: Sending coverage results + run: | + bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.xml -t ${{ secrets.CODACY_PROJECT_TOKEN }}