Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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: <your_github_username>/<your_repo_name>
notifications:
email:
- 1277396839@qq.com
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down