Skip to content
Closed

test #49

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1865651
提交
husofskyzy Apr 8, 2022
0f809cf
提交
husofskyzy Apr 8, 2022
00889b2
提交
husofskyzy Apr 8, 2022
43a94fb
提交
husofskyzy Apr 10, 2022
a13794d
提交
husofskyzy Apr 10, 2022
0fcd685
提交
husofskyzy Apr 10, 2022
897fb6b
提交
husofskyzy Apr 11, 2022
b0b2473
提交
husofskyzy Apr 11, 2022
00ed948
提交
husofskyzy Apr 11, 2022
48d6327
Update .travis.yml
husofskyzy Apr 11, 2022
735a287
Create maven.yml
husofskyzy Apr 11, 2022
78a2ece
提交
husofskyzy Apr 11, 2022
560810a
Merge remote-tracking branch 'origin/master'
husofskyzy Apr 11, 2022
755e03e
Create ci.y
husofskyzy Apr 11, 2022
5bfa4a9
提交
husofskyzy Apr 11, 2022
b379efa
提交
husofskyzy Apr 11, 2022
1252111
Update ci.yml
husofskyzy Apr 11, 2022
9f06d54
Update maven.yml
husofskyzy Apr 11, 2022
1164163
提交
husofskyzy Apr 11, 2022
16ca47c
Update maven.yml
husofskyzy Apr 11, 2022
0840263
提交
husofskyzy Apr 11, 2022
8c87e52
Merge remote-tracking branch 'origin/master'
husofskyzy Apr 11, 2022
dd63703
提交
husofskyzy Apr 11, 2022
e2e2bf0
提交
husofskyzy Apr 11, 2022
377c23b
Update HelloWorld3Test.java
husofskyzy Apr 11, 2022
c88dbf6
Update maven.yml
husofskyzy Apr 11, 2022
96f874a
Update maven.yml
husofskyzy Apr 11, 2022
8ddb304
提交
husofskyzy Apr 11, 2022
9166819
提交
husofskyzy Apr 11, 2022
4f46067
提交
husofskyzy Apr 11, 2022
f171c6d
提交
husofskyzy Apr 11, 2022
07eaf1f
提交
husofskyzy Apr 11, 2022
a1a506c
Update maven.yml
husofskyzy Apr 11, 2022
bd22f09
Update maven.yml
husofskyzy Apr 11, 2022
350d383
Update maven.yml
husofskyzy Apr 11, 2022
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .github/workflows/codecov.yml
Empty file.
28 changes: 28 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/junitgenerator-prj-settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 3 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
language: java
sudo: false # faster builds

jdk:
- oraclejdk11
- oraclejdk14

after_success:
- bash <(curl -s https://codecov.io/bash)
env:
global:
- CODECOV_TOKEN=: 59c9555b-2757-4ba5-8a72-e721fe3aac55
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [Codecov][0] Java Example

[![Build Status](https://travis-ci.org/codecov/example-java.svg?branch=master)](https://travis-ci.org/codecov/example-java)
[![codecov](https://codecov.io/gh/codecov/example-java/branch/master/graph/badge.svg)](https://codecov.io/gh/codecov/example-java)
[![codecov](https://codecov.io/gh/codecov/example-java/branch/master/graph/badge.svg)](https://codecov.io/gh/husofskyzy/example-java)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fcodecov%2Fexample-java.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fcodecov%2Fexample-java?ref=badge_shield)

## Guide
Expand Down
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
env:
global:
- CODECOV_TOKEN=: 59c9555b-2757-4ba5-8a72-e721fe3aac55
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<packaging>jar</packaging>

<name>JaCoCo Maven plug-in example for Java project</name>
<url>http://www.eclemma.org/jacoco</url>
<url>https://github.com/husofskyzy/example-java</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/org/jacoco/examples/maven/java/HelloWorld2.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.jacoco.examples.maven.java;

public class HelloWorld2 {
public void show(){
System.out.println("show time");
}
}
7 changes: 7 additions & 0 deletions src/main/java/org/jacoco/examples/maven/java/HelloWorld3.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.jacoco.examples.maven.java;

public class HelloWorld3 {
public void show(){
System.out.println("show time");
}
}
38 changes: 38 additions & 0 deletions src/test/java/org/jacoco/examples/maven/java/HelloWorld3Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.jacoco.examples.maven.java;

import org.junit.Before;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
* HelloWorld3 Tester
*/
public class HelloWorld3Test {

private HelloWorld subject;

@Before
public void setup() {
subject = new HelloWorld();
}

}