File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow uses actions that are not certified by GitHub.
2+ # They are provided by a third-party and are governed by
3+ # separate terms of service, privacy policy, and support documentation.
4+ # This workflow will do a clean install of java dependencies, build the source code and run tests across different versions of java
5+ # For more information see: https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven
6+
7+ name : Build and Test
8+
9+ on :
10+ push :
11+ branches : [ '**' ]
12+ pull_request :
13+ branches : [ master ]
14+
15+ # Allows you to run this workflow manually from the Actions tab
16+ workflow_dispatch :
17+
18+ jobs :
19+ build_test :
20+ name : Build and Test on Java ${{ matrix.java-version }} and ${{ matrix.os }}
21+ runs-on : ${{ matrix.os }}
22+ strategy :
23+ matrix :
24+ java-version : ['8']
25+ os : [ubuntu-latest]
26+
27+ steps :
28+ - uses : actions/checkout@v2
29+
30+ - name : Set up Java
31+ uses : actions/setup-java@v2
32+ with :
33+ java-version : ${{ matrix.java-version }}
34+ distribution : ' adopt'
35+
36+ - name : Install Java dependencies
37+ run : curl -s https://codecov.io/bash > $HOME/codecov-bash.sh && chmod +x $HOME/codecov-bash.sh
38+
39+ - name : Execute Java unit tests
40+ env :
41+ MVN_ARGS : ' -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn'
42+ run : mvn verify -fae -DskipITs $MVN_ARGS
43+
44+ - name : Publish Java code coverage
45+ if : github.ref == 'refs/heads/master'
46+ env :
47+ CC_TOK : ${{ secrets.CODECOV_TOKEN }}
48+ run : $HOME/codecov-bash.sh -s modules/coverage-reports/target/site/jacoco-aggregate -t $CC_TOK
You can’t perform that action at this time.
0 commit comments