Skip to content

Commit a33ade7

Browse files
committed
simplify
1 parent ec0416d commit a33ade7

File tree

4 files changed

+6
-312
lines changed

4 files changed

+6
-312
lines changed
Lines changed: 6 additions & 157 deletions
Original file line numberDiff line numberDiff line change
@@ -1,165 +1,14 @@
1-
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2-
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
1+
name: Ixion
32

4-
name: Java CI with Maven
5-
6-
on:
7-
push:
8-
branches: [ "main", "master", "develop" ]
9-
pull_request:
10-
branches: [ "main", "master", "develop" ]
11-
workflow_dispatch: # Позволяет запускать вручную
3+
on: push
124

135
jobs:
14-
build:
15-
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
java: [ '17', '21' ]
19-
20-
steps:
21-
- name: Checkout repository
22-
uses: actions/checkout@v4
23-
with:
24-
fetch-depth: 0
25-
26-
- name: Setup Java ${{ matrix.java }}
27-
uses: actions/setup-java@v4
28-
with:
29-
java-version: ${{ matrix.java }}
30-
distribution: 'temurin'
31-
cache: maven
32-
33-
- name: Cache Maven dependencies
34-
uses: actions/cache@v4
35-
with:
36-
path: ~/.m2
37-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
38-
restore-keys: ${{ runner.os }}-m2-
39-
40-
- name: Build with Maven
41-
run: mvn clean compile -DskipTests
42-
43-
- name: Run tests
44-
run: mvn test
45-
46-
- name: Run integration tests
47-
run: |
48-
if [ -f "src/test/resources" ]; then
49-
find src/test/resources -name "*.ix" -type f | head -5
50-
fi
51-
52-
- name: Build JAR
53-
run: mvn clean package -DskipTests
54-
55-
- name: Upload test results
56-
if: always()
57-
uses: actions/upload-artifact@v4
58-
with:
59-
name: test-results-${{ matrix.java }}
60-
path: |
61-
target/surefire-reports/
62-
target/failsafe-reports/
63-
retention-days: 7
64-
65-
- name: Upload build artifacts
66-
uses: actions/upload-artifact@v4
67-
with:
68-
name: build-artifacts-${{ matrix.java }}
69-
path: |
70-
target/*.jar
71-
target/classes/
72-
retention-days: 7
73-
74-
quality:
75-
runs-on: ubuntu-latest
76-
needs: build
77-
78-
steps:
79-
- name: Checkout repository
80-
uses: actions/checkout@v4
81-
82-
- name: Setup Java 21
83-
uses: actions/setup-java@v4
84-
with:
85-
java-version: '21'
86-
distribution: 'temurin'
87-
cache: maven
88-
89-
- name: Run static analysis with Checkstyle
90-
run: |
91-
mvn checkstyle:checkstyle || echo "Checkstyle failed but continuing..."
92-
93-
- name: Run PMD
94-
run: |
95-
mvn pmd:pmd || echo "PMD failed but continuing..."
96-
97-
- name: Generate JaCoCo coverage report
98-
run: mvn jacoco:prepare-agent test jacoco:report
99-
100-
- name: Upload JaCoCo coverage to Codecov
101-
uses: codecov/codecov-action@v4
102-
with:
103-
file: target/site/jacoco/jacoco.xml
104-
fail_ci_if_error: false
105-
106-
release:
107-
runs-on: ubuntu-latest
108-
needs: [build, quality]
109-
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
110-
111-
steps:
112-
- name: Checkout repository
113-
uses: actions/checkout@v4
114-
115-
- name: Setup Java 21
116-
uses: actions/setup-java@v4
117-
with:
118-
java-version: '21'
119-
distribution: 'temurin'
120-
cache: maven
121-
122-
- name: Configure Git
123-
run: |
124-
git config user.name "GitHub Actions"
125-
git config user.email "actions@github.com"
126-
127-
- name: Build and test
128-
run: mvn clean verify
129-
130-
- name: Create GitHub Release
131-
uses: softprops/action-gh-release@v1
132-
if: startsWith(github.ref, 'refs/tags/')
133-
with:
134-
files: |
135-
target/*.jar
136-
target/*.war
137-
target/*.tar.gz
138-
target/*.zip
139-
140-
dependency-check:
6+
test:
1417
runs-on: ubuntu-latest
1428

1439
steps:
144-
- name: Checkout repository
145-
uses: actions/checkout@v4
146-
147-
- name: Setup Java 21
148-
uses: actions/setup-java@v4
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-java@v4
14912
with:
15013
java-version: '21'
151-
distribution: 'temurin'
152-
cache: maven
153-
154-
- name: Run OWASP Dependency Check
155-
uses: dependency-check/Dependency-Check_Action@main
156-
with:
157-
project: 'ixion-jvm'
158-
path: '.'
159-
format: 'HTML'
160-
args: >
161-
--scan **/src
162-
--suppression .github/dependency-check-suppressions.xml
163-
--failOnCVSS 7
164-
env:
165-
JACKSON_DATA_TYPE_XML: 'xml'
14+
- run: mvn test

checkstyle-suppressions.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

checkstyle.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

pom.xml

Lines changed: 0 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -164,133 +164,8 @@
164164
<target>21</target>
165165
</configuration>
166166
</plugin>
167-
<plugin>
168-
<groupId>org.jacoco</groupId>
169-
<artifactId>jacoco-maven-plugin</artifactId>
170-
<version>0.8.12</version>
171-
<executions>
172-
<execution>
173-
<goals>
174-
<goal>prepare-agent</goal>
175-
</goals>
176-
</execution>
177-
<execution>
178-
<id>report</id>
179-
<phase>test</phase>
180-
<goals>
181-
<goal>report</goal>
182-
</goals>
183-
</execution>
184-
<execution>
185-
<id>check</id>
186-
<goals>
187-
<goal>check</goal>
188-
</goals>
189-
<configuration>
190-
<rules>
191-
<rule>
192-
<element>BUNDLE</element>
193-
<limits>
194-
<limit>
195-
<counter>INSTRUCTION</counter>
196-
<value>COVEREDRATIO</value>
197-
<minimum>0.60</minimum>
198-
</limit>
199-
</limits>
200-
</rule>
201-
</rules>
202-
</configuration>
203-
</execution>
204-
</executions>
205-
</plugin>
206-
207-
<!-- Checkstyle -->
208-
<plugin>
209-
<groupId>org.apache.maven.plugins</groupId>
210-
<artifactId>maven-checkstyle-plugin</artifactId>
211-
<version>3.3.1</version>
212-
<dependencies>
213-
<dependency>
214-
<groupId>com.puppycrawl.tools</groupId>
215-
<artifactId>checkstyle</artifactId>
216-
<version>10.12.7</version>
217-
</dependency>
218-
</dependencies>
219-
<configuration>
220-
<configLocation>google_checks.xml</configLocation>
221-
<encoding>UTF-8</encoding>
222-
<consoleOutput>true</consoleOutput>
223-
<failsOnError>false</failsOnError>
224-
<failOnViolation>false</failOnViolation>
225-
<includeTestSourceDirectory>false</includeTestSourceDirectory>
226-
<excludes>**/JavaCodegenVisitor.java,**/*Test.java</excludes>
227-
</configuration>
228-
<executions>
229-
<execution>
230-
<id>validate</id>
231-
<phase>validate</phase>
232-
<goals>
233-
<goal>check</goal>
234-
</goals>
235-
</execution>
236-
</executions>
237-
</plugin>
238-
239-
<!-- PMD -->
240-
<plugin>
241-
<groupId>org.apache.maven.plugins</groupId>
242-
<artifactId>maven-pmd-plugin</artifactId>
243-
<version>3.22.0</version>
244-
<configuration>
245-
<rulesets>
246-
<ruleset>/category/java/bestpractices.xml</ruleset>
247-
<ruleset>/category/java/codestyle.xml</ruleset>
248-
<ruleset>/category/java/design.xml</ruleset>
249-
<ruleset>/category/java/errorprone.xml</ruleset>
250-
<ruleset>/category/java/performance.xml</ruleset>
251-
<ruleset>/category/java/security.xml</ruleset>
252-
</rulesets>
253-
<failOnViolation>true</failOnViolation>
254-
<printFailingErrors>true</printFailingErrors>
255-
</configuration>
256-
<executions>
257-
<execution>
258-
<phase>validate</phase>
259-
<goals>
260-
<goal>check</goal>
261-
</goals>
262-
</execution>
263-
</executions>
264-
</plugin>
265167
</plugins>
266168
</build>
267-
268-
<profiles>
269-
<profile>
270-
<id>security</id>
271-
<build>
272-
<plugins>
273-
<plugin>
274-
<groupId>org.owasp</groupId>
275-
<artifactId>dependency-check-maven</artifactId>
276-
<version>9.0.9</version>
277-
<executions>
278-
<execution>
279-
<goals>
280-
<goal>check</goal>
281-
</goals>
282-
</execution>
283-
</executions>
284-
<configuration>
285-
<failBuildOnCVSS>7</failBuildOnCVSS>
286-
<suppressionFile>.github/dependency-check-suppressions.xml</suppressionFile>
287-
</configuration>
288-
</plugin>
289-
</plugins>
290-
</build>
291-
</profile>
292-
</profiles>
293-
294169
<properties>
295170
<maven.compiler.source>17</maven.compiler.source>
296171
<maven.compiler.target>17</maven.compiler.target>

0 commit comments

Comments
 (0)