Skip to content

Commit bb3dc47

Browse files
authored
Merge pull request #9 from kinow/add-sonarcloud
Add SonarCloud
2 parents 02818d8 + fd766b8 commit bb3dc47

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,21 @@
22

33
name: CI
44

5-
# Controls when the action will run. Triggers the workflow on push or pull request
6-
# events but only for the master branch
7-
on:
8-
push:
9-
branches: [ master ]
10-
pull_request:
11-
branches: [ master ]
5+
on: [push, pull_request]
126

13-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
147
jobs:
15-
# This workflow contains a single job called "build"
168
build:
17-
# The type of runner that the job will run on
189
runs-on: ubuntu-latest
1910

20-
# Steps represent a sequence of tasks that will be executed as part of the job
2111
steps:
22-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2312
- uses: actions/checkout@v2
13+
- name: Set up JDK
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: '8'
17+
- name: Analyze with SonarCloud
18+
run: mvn -B verify sonar:sonar -Dsonar.projectKey=tupilabs_HumanNameParser.java -Dsonar.organization=tupilabs -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN
19+
env:
20+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2421

25-
# Runs Maven
26-
- name: GitHub Action for Maven
27-
uses: LucaFeger/action-maven-cli@1.1.0
2822

0 commit comments

Comments
 (0)