-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (67 loc) · 1.9 KB
/
Copy pathci.yml
File metadata and controls
82 lines (67 loc) · 1.9 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI/CD Pipeline
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
build-and-test:
runs-on: ubuntu-24.04
services:
nacos:
image: nacos/nacos-server:v2.4.3-slim
env:
MODE: standalone
JAVA_OPT: "-Djdk.attach.allowAttachSelf=true"
ports:
- 8848:8848
- 9848:9848
options: >-
--health-cmd="curl -f http://localhost:8848/nacos/v1/console/health/readiness"
--health-interval=10s
--health-timeout=5s
--health-retries=15
--health-start-period=60s
--cgroupns=host
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Build with Maven
run: mvn clean package -DskipTests
- name: Run unit tests
run: mvn test -pl rpc-core,rpc-transport-netty
- name: Run integration tests
run: mvn test -pl rpc-consumer -am -Dtest=FullIntegrationTest
env:
RPC_REGISTRY: local
- name: Check test coverage
run: mvn jacoco:report
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
**/target/surefire-reports/
**/target/site/jacoco/
code-quality:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
- name: Run Maven verify
run: mvn verify -DskipTests
- name: Check code style
run: mvn checkstyle:check || true