diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..629b76b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +# Building a Java project +language: java + +# We can specify a list of JDKs to be used for testing +jdk: + - openjdk11 +after_success: + - bash <(curl -s https://codecov.io/bash) +deploy: + provider: releases + file_glob: true + skip_cleanup: true + api_key: $GITHUB_TOKEN + file: + - .travis.yml + on: + tags: true + branch: tag + repo: / +notifications: + email: + - 1277396839@qq.com diff --git a/README.md b/README.md index 5787322..b2d70b6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ - +[![Build Status](https://travis-ci.com/OrsonM/Travis_CI_Tutorial.svg?branch=main)](https://travis-ci.com/OrsonM/Travis_CI_Tutorial) +[![codecov](https://codecov.io/gh/OrsonM/Travis_CI_Tutorial/branch/main/graph/badge.svg?token=TN19KWYHEN)](https://codecov.io/gh/OrsonM/Travis_CI_Tutorial) # How to Use Travis CI with Java on GitHub This repository is a demo of how to use [Travis CI](https://docs.travis-ci.com/) in a Java project on GitHub. diff --git a/src/main/java/io/github/kreattang/travis_ci_tutorial/trityp.java b/src/main/java/io/github/kreattang/travis_ci_tutorial/trityp.java index faea2d7..4551406 100644 --- a/src/main/java/io/github/kreattang/travis_ci_tutorial/trityp.java +++ b/src/main/java/io/github/kreattang/travis_ci_tutorial/trityp.java @@ -58,7 +58,7 @@ static int Triang (int Side1, int Side2, int Side3) triOut = 0; if (Side1 == Side2) - triOut = triOut + 1; + triOut = triOut + 2; if (Side1 == Side3) triOut = triOut + 2; if (Side2 == Side3)