-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.yml.ignore
65 lines (65 loc) · 2.33 KB
/
build.yml.ignore
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: SonarCloud
on:
push:
branches:
- master
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
env:
JAVAMAIL_USER: ${{ secrets.JAVAMAIL_USER }}
JAVAMAIL_PASS: ${{ secrets.JAVAMAIL_PASS }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_USER: ccsm
MYSQL_PASSWORD: ccsm1234
MYSQL_DATABASE: carpet_cleaning_service_management
MYSQL_ROOT_PASSWORD: root_password
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu' # Alternative distribution options are available.
- name: Cache SonarCloud packages
uses: actions/cache@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Xvfb
run: |
sudo apt-get update
sudo apt-get install -y xvfb
sudo apt-get install -y at-spi2-core
sudo Xvfb :99 -ac -screen 0 1920x1080x24 &
echo "DISPLAY=:99.0" >> $GITHUB_ENV
- name: Import SQL script
run: |
echo "Importing SQL script..."
sudo apt-get install -y mysql-client
mysql --host 127.0.0.1 --port 3306 -u ccsm -pccsm1234 carpet_cleaning_service_management < assets/sql/TEST.sql
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.projectKey=izzat-najah-edu_carpet-cleaning-service-management
-DargLine="--add-exports javafx.graphics/com.sun.javafx.application=org.testfx"