-
-
Notifications
You must be signed in to change notification settings - Fork 81
34 lines (29 loc) · 886 Bytes
/
ci.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
name: CI
on: [ push, pull_request ]
jobs:
build-and-test:
name: 构建和测试
strategy:
matrix:
os: [ ubuntu-latest ]
java: [ 23 ]
runs-on: ${{ matrix.os }}
steps:
- name: 签出代码
uses: actions/checkout@v4
- name: 启动默认的 MySQL
if: ${{ runner.os == 'Linux' }}
run: sudo systemctl start mysql.service
- name: 安装 JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: 使用 Maven 进行构建和测试
run: mvn package --batch-mode
- name: 上传 构建和测试 生成的文件
uses: actions/upload-artifact@v4
with:
name: live-room-watcher-artifact-${{ runner.os }}-${{ matrix.java }}
path: target/