From 7aa0b018726a651601c758228c8ad965135a29d0 Mon Sep 17 00:00:00 2001
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
Date: Fri, 11 Dec 2020 16:53:40 +0300
Subject: [PATCH] github-ci: switch coverage saving from travis-ci

Moved coverage saving to coveralls.io repository from travis-ci to
github-ci. Completely removed travis-ci from commit criteria.

Part of #5294
---
 .github/workflows/debug_coverage.yml |  2 ++
 .travis.mk                           |  7 +++--
 .travis.yml                          | 40 ----------------------------
 3 files changed, 7 insertions(+), 42 deletions(-)
 delete mode 100644 .travis.yml

diff --git a/.github/workflows/debug_coverage.yml b/.github/workflows/debug_coverage.yml
index 952a02c8eb..70ce7bb7fb 100644
--- a/.github/workflows/debug_coverage.yml
+++ b/.github/workflows/debug_coverage.yml
@@ -19,6 +19,8 @@ jobs:
       - uses: actions/checkout@v1
       - name: test
         run: ${CI_MAKE} test_coverage_debian_no_deps
+        env:
+          COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
       - name: artifacts
         uses: actions/upload-artifact@v2
         if: failure()
diff --git a/.travis.mk b/.travis.mk
index f282a9cee9..4290a5f8c5 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -140,11 +140,14 @@ test_coverage_debian_no_deps: build_coverage_debian
 	lcov --compat-libtool --remove coverage.info.tmp 'tests/*' 'third_party/*' '/usr/*' \
 		--rc lcov_branch_coverage=1 --rc lcov_function_coverage=1 --output-file coverage.info
 	lcov --list coverage.info
+	# coveralls API: https://docs.coveralls.io/api-reference
 	@if [ -n "$(COVERALLS_TOKEN)" ]; then \
 		echo "Exporting code coverage information to coveralls.io"; \
 		gem install coveralls-lcov; \
-		echo coveralls-lcov --service-name travis-ci --service-job-id $(TRAVIS_JOB_ID) --repo-token [FILTERED] coverage.info; \
-		coveralls-lcov --service-name travis-ci --service-job-id $(TRAVIS_JOB_ID) --repo-token $(COVERALLS_TOKEN) coverage.info; \
+		echo coveralls-lcov --service-name github-ci --service-job-id $(GITHUB_RUN_ID) \
+			--repo-token [FILTERED] coverage.info; \
+		coveralls-lcov --service-name github-ci --service-job-id $(GITHUB_RUN_ID) \
+			--repo-token $(COVERALLS_TOKEN) coverage.info; \
 	fi;
 
 coverage_debian: deps_debian test_coverage_debian_no_deps
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index c2f7bbe946..0000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-sudo: false
-services:
-  - docker
-
-language: cpp
-
-# default values
-os: linux
-compiler: gcc
-
-cache:
-    directories:
-      - $HOME/.cache
-
-git:
-    depth: 100500
-
-env: >
-    TEST_RUN_EXTRA_PARAMS="-j 1"
-
-jobs:
-    include:
-      # Testing targets (just run tests on Debian Stretch or OS X).
-      - name: "RelWithDebInfo build + test (Linux, gcc)"
-        env: TARGET=test
-      - name: "RelWithDebInfo build + test (Linux, clang)"
-        env: TARGET=test
-        compiler: clang
-      - name: "Debug build + test + coverage (Linux, gcc)"
-        env: TARGET=coverage
-
-script:
-  - make -f .travis.mk ${TARGET}
-
-notifications:
-  email:
-    recipients:
-      - build@tarantool.org
-    on_success: change
-    on_failure: always
-- 
GitLab