diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b234ea706..ae81fbfae 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -70,14 +70,14 @@ jobs: run: | cd src/github.com/goharbor/harbor env - bash ./tests/showtime.sh ./tests/travis/ut_install.sh + bash ./tests/showtime.sh ./tests/ci/ut_install.sh - name: script env: COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | echo IP: $IP cd src/github.com/goharbor/harbor - bash ./tests/showtime.sh ./tests/travis/ut_run.sh $IP + bash ./tests/showtime.sh ./tests/ci/ut_run.sh $IP - name: Codecov For BackEnd uses: codecov/codecov-action@v1 with: @@ -137,12 +137,12 @@ jobs: run: | cd src/github.com/goharbor/harbor env - bash ./tests/showtime.sh ./tests/travis/api_common_install.sh $IP DB + bash ./tests/showtime.sh ./tests/ci/api_common_install.sh $IP DB - name: script run: | cd src/github.com/goharbor/harbor echo IP: $IP - bash ./tests/showtime.sh ./tests/travis/api_run.sh DB $IP + bash ./tests/showtime.sh ./tests/ci/api_run.sh DB $IP APITEST_LDAP: env: @@ -194,12 +194,12 @@ jobs: run: | cd src/github.com/goharbor/harbor env - bash ./tests/showtime.sh ./tests/travis/api_common_install.sh $IP LDAP + bash ./tests/showtime.sh ./tests/ci/api_common_install.sh $IP LDAP - name: script run: | echo IP: $IP cd src/github.com/goharbor/harbor - bash ./tests/showtime.sh ./tests/travis/api_run.sh LDAP $IP + bash ./tests/showtime.sh ./tests/ci/api_run.sh LDAP $IP OFFLINE: env: @@ -252,7 +252,7 @@ jobs: run: | echo IP: $IP cd src/github.com/goharbor/harbor - bash ./tests/showtime.sh ./tests/travis/distro_installer.sh + bash ./tests/showtime.sh ./tests/ci/distro_installer.sh UI_UT: env: @@ -297,7 +297,7 @@ jobs: run: | echo IP: $IP cd src/github.com/goharbor/harbor - bash ./tests/showtime.sh ./tests/travis/ui_ut_run.sh + bash ./tests/showtime.sh ./tests/ci/ui_ut_run.sh - name: Codecov For UI uses: codecov/codecov-action@v1.0.5 with: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d25d6c9c5..000000000 --- a/.travis.yml +++ /dev/null @@ -1,73 +0,0 @@ -sudo: true -language: go -go: -- 1.13.4 -go_import_path: github.com/goharbor/harbor -services: -- docker -dist: trusty -matrix: - include: - - go: 1.13.4 - env: - - UTTEST=true - - go: 1.13.4 - env: - - APITEST_DB=true - - go: 1.13.4 - env: - - APITEST_LDAP=true - - go: 1.13.4 - env: - - OFFLINE=true - - language: node_js - node_js: 10.16.2 - env: - - UI_UT=true -env: - global: - - POSTGRESQL_HOST: localhost - - POSTGRESQL_PORT: 5432 - - POSTGRESQL_USR: postgres - - POSTGRESQL_PWD: root123 - - POSTGRESQL_DATABASE: registry - - ADMINSERVER_URL: http://127.0.0.1:8888 - - DOCKER_COMPOSE_VERSION: 1.23.0 - - HARBOR_ADMIN: admin - - HARBOR_ADMIN_PASSWD: Harbor12345 - - CORE_SECRET: tempString - - KEY_PATH: "/data/secret/keys/secretkey" - - REDIS_HOST: localhost - - REG_VERSION: v2.7.1-patch-2819-2553 - - UI_BUILDER_VERSION: 1.6.0 - - TOKEN_PRIVATE_KEY_PATH: "/home/travis/gopath/src/github.com/goharbor/harbor/tests/private_key.pem" -addons: -apt: - sources: - - google-chrome - packages: - - google-chrome-stable - - google-chrome-beta -before_install: -- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname - -s`-`uname -m` > docker-compose -- chmod +x docker-compose -- sudo mv docker-compose /usr/local/bin -- IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'` -- sudo sed -i '$a DOCKER_OPTS=\"--insecure-registry '$IP':5000\"' /etc/default/docker -- export IP=$IP -- sudo cp ./tests/harbor_ca.crt /usr/local/share/ca-certificates/ -- sudo update-ca-certificates -- sudo service docker restart -install: -- if [ "$UTTEST" == true ]; then bash ./tests/showtime.sh ./tests/travis/ut_install.sh ; fi -- if [ "$APITEST_DB" == true ]; then bash ./tests/showtime.sh ./tests/travis/api_common_install.sh $IP - DB; fi -- if [ "$APITEST_LDAP" == true ]; then bash ./tests/showtime.sh ./tests/travis/api_common_install.sh $IP - LDAP; fi -script: -- if [ "$UTTEST" == true ]; then bash ./tests/showtime.sh ./tests/travis/ut_run.sh $IP; fi -- if [ "$APITEST_DB" == true ]; then bash ./tests/showtime.sh ./tests/travis/api_run.sh DB $IP; fi -- if [ "$APITEST_LDAP" == true ]; then bash ./tests/showtime.sh ./tests/travis/api_run.sh LDAP $IP; fi -- if [ "$OFFLINE" == true ]; then bash ./tests/showtime.sh ./tests/travis/distro_installer.sh; fi -- if [ "$UI_UT" == true ]; then bash ./tests/showtime.sh ./tests/travis/ui_ut_run.sh ; fi \ No newline at end of file diff --git a/README.md b/README.md index b22606800..7a02ab1a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Harbor -[![Build Status](https://travis-ci.org/goharbor/harbor.svg?branch=master)](https://travis-ci.org/goharbor/harbor) +![CI](https://github.com/goharbor/harbor/workflows/CI/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/goharbor/harbor/badge.svg?branch=master)](https://coveralls.io/github/goharbor/harbor?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/goharbor/harbor)](https://goreportcard.com/report/github.com/goharbor/harbor) [![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/2095/badge)](https://bestpractices.coreinfrastructure.org/projects/2095) diff --git a/src/common/utils/email/mail_test.go b/src/common/utils/email/mail_test.go index 5f41c90f2..e9ad10b66 100644 --- a/src/common/utils/email/mail_test.go +++ b/src/common/utils/email/mail_test.go @@ -42,7 +42,7 @@ func TestSend(t *testing.T) { // TODO // assert.Nil(t, err) - /*not work on travis + /*not work on ci // non-tls connection addr = "smtp.gmail.com:25" tls = false @@ -82,7 +82,7 @@ func TestPing(t *testing.T) { // TODO // assert.Nil(t, err) - /*not work on travis + /*not work on ci // non-tls connection addr = "smtp.gmail.com:25" tls = false diff --git a/tests/travis/api_common_install.sh b/tests/ci/api_common_install.sh similarity index 100% rename from tests/travis/api_common_install.sh rename to tests/ci/api_common_install.sh diff --git a/tests/travis/api_run.sh b/tests/ci/api_run.sh similarity index 100% rename from tests/travis/api_run.sh rename to tests/ci/api_run.sh diff --git a/tests/travis/distro_installer.sh b/tests/ci/distro_installer.sh similarity index 100% rename from tests/travis/distro_installer.sh rename to tests/ci/distro_installer.sh diff --git a/tests/travis/ui_ut_run.sh b/tests/ci/ui_ut_run.sh similarity index 100% rename from tests/travis/ui_ut_run.sh rename to tests/ci/ui_ut_run.sh diff --git a/tests/travis/ut_install.sh b/tests/ci/ut_install.sh similarity index 100% rename from tests/travis/ut_install.sh rename to tests/ci/ut_install.sh diff --git a/tests/travis/ut_run.sh b/tests/ci/ut_run.sh similarity index 100% rename from tests/travis/ut_run.sh rename to tests/ci/ut_run.sh