-
-
Notifications
You must be signed in to change notification settings - Fork 101
140 lines (127 loc) · 4.87 KB
/
bofore_checker.yml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: Before checker with maven
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "dev" ]
jobs:
before_checker_loading:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- run: echo 'Before checker loading'
before_checker_ui:
runs-on: ubuntu-latest
needs:
- before_checker_loading
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: cd core/datacap-ui && npm install pnpm -g && pnpm install && pnpm run build
before_checker_style:
runs-on: ubuntu-latest
needs:
- before_checker_ui
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Maven Checker Style
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- run: chmod 755 ./mvnw
- run: ./mvnw clean install checkstyle:checkstyle -Dspotbugs.skip -Dgpg.skip -Dskip.pnpm -DskipTests=true
before_checker_bugs:
runs-on: ubuntu-latest
needs:
- before_checker_ui
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Maven Checker Bugs
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Grant execute permission for mvnw
run: chmod +x mvnw
- name: Run SpotBugs skip server
env:
MAVEN_OPTS: -Xmx1024m
run: ./mvnw clean install spotbugs:spotbugs -pl '!core/datacap-server' -Dcheckstyle.skip -Dgpg.skip -Dskip.pnpm -DskipTests=true
- name: Run SpotBugs for server
run: ./mvnw clean install spotbugs:spotbugs -Dcheckstyle.skip -Dgpg.skip -Dskip.pnpm -DskipTests=true -f core/datacap-server/pom.xml
before_checker_test:
runs-on: ubuntu-latest
needs:
- before_checker_style
- before_checker_bugs
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Maven Checker Style
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Add hosts
run: |
echo "156.238.128.11 cdn.north.devlive.org" | sudo tee -a /etc/hosts
echo "156.238.128.17 cdn.north.devlive.org" | sudo tee -a /etc/hosts
echo "156.238.128.19 cdn.north.devlive.org" | sudo tee -a /etc/hosts
echo "156.238.128.23 cdn.north.devlive.org" | sudo tee -a /etc/hosts
- run: chmod 755 ./mvnw
- name: Debug Environment Variables
env:
QINIU_ACCESS: ${{ secrets.QINIU_ACCESS }}
QINIU_SECRET: ${{ secrets.QINIU_SECRET }}
QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }}
QINIU_ENDPOINT: ${{ secrets.QINIU_ENDPOINT }}
run: |
echo "QINIU_ENDPOINT is set: ${{ secrets.QINIU_ENDPOINT != '' }}"
echo "QINIU_ENDPOINT length: ${#QINIU_ENDPOINT}"
- name: Run Tests
if: ${{ env.QINIU_ENDPOINT != '' }}
env:
QINIU_ACCESS: ${{ secrets.QINIU_ACCESS }}
QINIU_SECRET: ${{ secrets.QINIU_SECRET }}
QINIU_BUCKET: ${{ secrets.QINIU_BUCKET }}
QINIU_ENDPOINT: ${{ secrets.QINIU_ENDPOINT }}
ALIOSS_ACCESS: ${{ secrets.ALIOSS_ACCESS }}
ALIOSS_SECRET: ${{ secrets.ALIOSS_SECRET }}
ALIOSS_BUCKET: ${{ secrets.ALIOSS_BUCKET }}
ALIOSS_ENDPOINT: ${{ secrets.ALIOSS_ENDPOINT }}
COS_ACCESS: ${{ secrets.COS_ACCESS }}
COS_SECRET: ${{ secrets.COS_SECRET }}
COS_BUCKET: ${{ secrets.COS_BUCKET }}
COS_ENDPOINT: ${{ secrets.COS_ENDPOINT }}
S3_ACCESS: ${{ secrets.S3_ACCESS }}
S3_SECRET: ${{ secrets.S3_SECRET }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
run: |
./mvnw clean test -Dspotbugs.skip -Dgpg.skip -Dcheckstyle.skip -Dskip.pnpm \
-Dqiniu.access="$QINIU_ACCESS" -Dqiniu.secret="$QINIU_SECRET" -Dqiniu.bucket="$QINIU_BUCKET" -Dqiniu.endpoint="$QINIU_ENDPOINT" \
-Dalioss.access="$ALIOSS_ACCESS" -Dalioss.secret="$ALIOSS_SECRET" -Dalioss.bucket="$ALIOSS_BUCKET" -Dalioss.endpoint="$ALIOSS_ENDPOINT" \
-Dcos.access="$COS_ACCESS" -Dcos.secret="$COS_SECRET" -Dcos.bucket="$COS_BUCKET" -Dcos.endpoint="$COS_ENDPOINT" \
-Ds3.access="$S3_ACCESS" -Ds3.secret="$S3_SECRET" -Ds3.bucket="$S3_BUCKET" -Ds3.endpoint="$S3_ENDPOINT"
before_checker_package:
runs-on: ubuntu-latest
needs:
- before_checker_test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Maven Checker Package
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- run: chmod 755 ./mvnw
- run: ./mvnw -T 1C clean install package -Dspotbugs.skip -Dgpg.skip -Dcheckstyle.skip -DskipTests=true