Skip to content

Commit 5ce186d

Browse files
committed
ci: implement build/test
1 parent de925e8 commit 5ce186d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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: '--settings build/.travis.settings.xml'
42+
run: |
43+
build/setMavenVersion.sh
44+
mvn verify -fae -DskipITs $MVN_ARGS
45+
46+
- name: Publish Java code coverage
47+
run: build/publishCodeCoverage.sh

0 commit comments

Comments
 (0)