Browse Source

feat: update docs (#64)

* feat: update docs

* fix: ut execute error

* feat:update auto-check workflow
master
vran 3 years ago
committed by GitHub
parent
commit
17d0f3a024
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      .github/workflows/auto-check.yml
  2. 2
      README.md
  3. 1
      core/build.gradle
  4. 4
      core/src/test/java/com/databasir/core/BaseTest.java
  5. 5
      core/src/test/java/com/databasir/core/infrastructure/event/subscriber/DocumentEventSubscriberTest.java
  6. 10
      core/src/test/java/com/databasir/core/infrastructure/event/subscriber/UserEventSubscriberTest.java
  7. 1
      core/src/test/resources/sql/init.sql
  8. 3
      docs/README.md
  9. BIN
      docs/README/management-project/img/project-sync4.png
  10. 2
      docs/README/management-project/index.md
  11. BIN
      docs/README/management-user/img/user-create4.png
  12. 2
      docs/README/management-user/index.md

11
.github/workflows/auto-check.yml

@ -1,5 +1,14 @@
name: check
on: pull_request
on:
pull_request:
paths:
- 'api/**'
- 'common/**'
- 'core/**'
- 'dao/**'
- 'plugin/**'
- 'gradle/**'
- 'config/**'
jobs:
checkstyle:

2
README.md

@ -34,7 +34,7 @@
- [ ] Word
2. 邮件通知
- [ ] 新增讨论
- [ ] 版本变更
- [x] 版本变更
## 联系作者

1
core/build.gradle

@ -38,5 +38,6 @@ dependencies {
// test
testImplementation "mysql:mysql-connector-java:${mysqlConnectorVersion}"
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.flywaydb:flyway-core'
}

4
core/src/test/java/com/databasir/core/BaseTest.java

@ -3,12 +3,10 @@ package com.databasir.core;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.jdbc.Sql;
import org.springframework.test.context.junit.jupiter.SpringExtension;
@SpringBootTest(classes = CoreTestApplication.class)
@SpringBootTest(classes = CoreTestApplication.class, webEnvironment = SpringBootTest.WebEnvironment.NONE)
@ActiveProfiles("ut")
@ExtendWith(SpringExtension.class)
@Sql({"classpath:sql/init.sql"})
public class BaseTest {
}

5
core/src/test/java/com/databasir/core/infrastructure/event/subscriber/DocumentEventSubscriberTest.java

@ -31,7 +31,10 @@ class DocumentEventSubscriberTest extends BaseTest {
}
@Test
@Sql("classpath:/sql/event/subscriber/DocumentEventSubscriberTest.sql")
@Sql(scripts = {
"classpath:sql/event/subscriber/DocumentEventSubscriberTest.sql",
"classpath:sql/init.sql"
})
void onDocumentUpdated() {
var event = new DocumentUpdated();
RootDiff diff = new RootDiff();

10
core/src/test/java/com/databasir/core/infrastructure/event/subscriber/UserEventSubscriberTest.java

@ -29,7 +29,10 @@ class UserEventSubscriberTest extends BaseTest {
}
@Test
@Sql("classpath:sql/event/subscriber/UserEventSubscriberTest.sql")
@Sql({
"classpath:sql/event/subscriber/UserEventSubscriberTest.sql",
"classpath:sql/init.sql"
})
void onPasswordRenewed() {
var event = UserPasswordRenewed.builder()
.email("ut@databasir.com")
@ -43,7 +46,10 @@ class UserEventSubscriberTest extends BaseTest {
}
@Test
@Sql("classpath:sql/event/subscriber/UserEventSubscriberTest.sql")
@Sql({
"classpath:sql/event/subscriber/UserEventSubscriberTest.sql",
"classpath:sql/init.sql"
})
void onUserCreated() {
var event = UserCreated.builder()
.username("ut")

1
core/src/test/resources/sql/init.sql

@ -1,4 +1,3 @@
# mail configuration
REPLACE INTO databasir.sys_mail (id, username, password, smtp_host, smtp_port, use_ssl, update_at, create_at)
VALUES (999, 'ut@databasir.com', '123456', 'smtp.exmail.databasir.com', 465, 1, '2022-03-25 03:14:27',
'2022-03-21 14:20:56');

3
docs/README.md

@ -13,7 +13,6 @@
| demo | demo123 | 系统管理员 |
| dev | dev123 | 普通 |
## 特性
1. 兼容市面多数数据库:支持所有拥有 JDBC 驱动的数据库,mysql、postgresql 开箱即用
@ -33,7 +32,7 @@
- [ ] Word
2. 邮件通知
- [ ] 文档新增讨论
- [ ] 文档版本变更
- [x] 文档版本变更
## 更多

BIN
docs/README/management-project/img/project-sync4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

2
docs/README/management-project/index.md

@ -99,7 +99,9 @@
![](img/project-sync3.png)
如果有新的内容产生,那么该项目所属分组下的组员都将收到邮件通知
![img.png](img/project-sync4.png)
在该页面仍可以点击同步按钮同步文档,**但 Databasir 会自动与当前最新版本的文档做对比,如果没有结构变更,不会创建新的版本内容。**

BIN
docs/README/management-user/img/user-create4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

2
docs/README/management-user/index.md

@ -22,7 +22,9 @@ Databasir 目前不会校验邮箱的真实性,请确保邮箱填写正确
![](img/user-create3.png)
如果已经配置了系统邮箱,那么新建账户对应的信息将通过邮件通知给用户
![](img/user-create4.png)
## 用户详情

Loading…
Cancel
Save