-
Notifications
You must be signed in to change notification settings - Fork 51
39 lines (36 loc) · 948 Bytes
/
workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
DISPLAY: :99
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v1
with:
java-version: 17
- name: Start Xvfb
run: Xvfb :99 &
- name: Test with Maven
run: mvn -B test
- name: Test with Gradle
run: ./gradlew test
- name: Upload analysis to SonarCloud
if: success() && !contains(github.ref, 'pull')
run: >
mvn -B sonar:sonar
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=bonigarcia-github
-Dsonar.projectKey=io.github.bonigarcia:rate-my-cat
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1