pr进行ci测试

This commit is contained in:
禾几海
2020-05-27 18:30:08 +08:00
committed by GitHub
3 changed files with 34 additions and 7 deletions

29
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
name: Blog backEnd CI
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
env:
APPLICATION_PROPERTIES_TEST: ${{ secrets.APPLICATION_PROPERTIES_TEST }}
APPLICATION_PROPERTIES_PROD: ${{ secrets.APPLICATION_PROPERTIES_PROD }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build jar file
run: echo $APPLICATION_PROPERTIES_TEST|base64 -d > src/main/resources/application-test.properties && mvn -B test --file pom.xml

View File

@@ -139,7 +139,7 @@ where article.a_id = article_tag.a_id
CREATE VIEW commentView CREATE VIEW commentView
(commentId, pagePath, content, date, status, pid, toAuthorId, toAuthorEmail, toAuthorDisplayName, (commentId, pagePath, content, date, status, pid, toAuthorId, toAuthorEmail, toAuthorDisplayName,
toAuthorAvatar, fromAuthorId, fromAuthorEmail, fromAuthorDisplayName, toAuthorAvatar, fromAuthorId, fromAuthorEmail, fromAuthorDisplayName,
fromAuthorAvatar, isDelete) fromAuthorAvatar)
as as
select cuT.co_id as commentId, select cuT.co_id as commentId,
cuT.co_page_path as pagePath, cuT.co_page_path as pagePath,
@@ -154,8 +154,7 @@ select cuT.co_id as commentId,
userFrom.u_id as fromAuthorId, userFrom.u_id as fromAuthorId,
userFrom.u_email as fromAuthorEmail, userFrom.u_email as fromAuthorEmail,
userFrom.u_display_name as fromAuthorDisplayName, userFrom.u_display_name as fromAuthorDisplayName,
userFrom.u_avatar as fromAuthorAvatar, userFrom.u_avatar as fromAuthorAvatar
cuT.is_delete as isDelete
from (select comment.co_id, from (select comment.co_id,
comment.co_page_path, comment.co_page_path,
comment.co_content, comment.co_content,
@@ -166,8 +165,7 @@ from (select comment.co_id,
comment.co_to_author_id, comment.co_to_author_id,
userTo.u_email as toEmail, userTo.u_email as toEmail,
userTo.u_display_name as toDisplayName, userTo.u_display_name as toDisplayName,
userTo.u_avatar as toAvatar, userTo.u_avatar as toAvatar
comment.is_delete
from comment from comment
left join user userTo on (comment.co_to_author_id = userTo.u_id) left join user userTo on (comment.co_to_author_id = userTo.u_id)
) as cuT, ) as cuT,

View File

@@ -37,8 +37,8 @@
<insert id="insert" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" useGeneratedKeys="true" keyProperty="id">
insert into comment (co_page_path, co_content, co_date, co_pid, co_from_author_id, co_to_author_id, is_delete) insert into comment (co_page_path, co_content, co_date, co_pid, co_from_author_id, co_to_author_id, co_status)
VALUES (#{pagePath}, #{content}, now(), #{pid}, #{fromUser.id}, #{toUser.id}, false) VALUES (#{pagePath}, #{content}, now(), #{pid}, #{fromUser.id}, #{toUser.id}, 0)
</insert> </insert>
<update id="updateContent"> <update id="updateContent">