Skip to content

Commit 2f254fc

Browse files
author
Vitaliy
authored
Merge pull request magento#188 from roma-glushko/184-setup-code-style-checks
magento#184 Setup Code Style Checks 📦
2 parents adcfd82 + e46d107 commit 2f254fc

File tree

6 files changed

+567
-55
lines changed

6 files changed

+567
-55
lines changed

.github/workflows/gradle.yml

+38-13
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up JDK 1.8
18-
uses: actions/setup-java@v1
19-
with:
20-
java-version: 1.8
21-
- name: Gradle wrapper
22-
run: gradle wrapper
23-
- name: Grant execute permission for gradlew
24-
run: chmod +x gradlew
25-
- name: Run automated tests
26-
run: ./gradlew test -i
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
- name: Gradle wrapper
22+
run: gradle wrapper
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Run automated tests
26+
run: ./gradlew test -i --no-daemon
2727

2828
build-windows:
2929

@@ -40,7 +40,7 @@ jobs:
4040
- name: Grant execute permission for gradlew
4141
run: chmod +x gradlew
4242
- name: Run automated tests
43-
run: ./gradlew test -i
43+
run: ./gradlew test -i --no-daemon
4444

4545
build-macos:
4646

@@ -57,4 +57,29 @@ jobs:
5757
- name: Grant execute permission for gradlew
5858
run: chmod +x gradlew
5959
- name: Run automated tests
60-
run: ./gradlew test -i
60+
run: ./gradlew test -i --no-daemon
61+
62+
static-tests:
63+
64+
runs-on: ubuntu-latest
65+
66+
steps:
67+
- uses: actions/checkout@v2
68+
- name: Set up JDK 1.8
69+
uses: actions/setup-java@v1
70+
with:
71+
java-version: 1.8
72+
- name: Gradle wrapper
73+
run: gradle wrapper
74+
- name: Grant execute permission for gradlew
75+
run: chmod +x gradlew
76+
- id: file_changes
77+
uses: trilom/file-changes-action@v1.2.3
78+
- name: Run Code Style Check
79+
run: ./gradlew checkstyleCI -i --no-daemon
80+
env:
81+
MODIFIED_FILES: ${{ steps.file_changes.outputs.files}}
82+
- name: Run PMD Quality Check
83+
run: ./gradlew pmdCI -i --no-daemon
84+
env:
85+
MODIFIED_FILES: ${{ steps.file_changes.outputs.files}}

build.gradle

+8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

66
plugins {
77
id 'org.jetbrains.intellij' version '0.4.15'
8+
id 'checkstyle'
9+
id 'pmd'
10+
}
11+
12+
repositories {
13+
mavenCentral()
814
}
915

1016
group 'com.magento.idea'
@@ -56,3 +62,5 @@ static def getDate() {
5662
def formattedDate = date.format('yyyy-MM-dd-HH-mm')
5763
return formattedDate
5864
}
65+
66+
apply from: "${project.rootDir}/gradle-tasks/staticChecks.gradle"

0 commit comments

Comments
 (0)