Skip to content

Commit

Permalink
CI configuration, most code are generated by github, we only add cach…
Browse files Browse the repository at this point in the history
…eing maven packages and set jdk version to 8
  • Loading branch information
hideak1 committed Jun 30, 2023
1 parent 3218b37 commit 6bb23e1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Maven Build and Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'zulu'
cache: maven
- name: Build and Test
run: mvn -B test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ MallChat的后端项目,是一个既能购物又能即时聊天的电商系统
<a href="https://github.com/Evansy/MallChatWeb"><img src="https://img.shields.io/badge/前端-项目地址-blueviolet.svg?style=plasticr"></a>
</p>

[![UNIT TEST](https://github.com/zongzibinbin/MallChat/actions/workflows/unittest.yml/badge.svg?branch=main)](https://github.com/zhongzhibinbin/MallChat/actions/workflows/unittest.yml)

## 项目导航

Expand Down
22 changes: 22 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,30 @@
<jsoup.version>1.15.3</jsoup.version>
<okhttp.version>4.8.1</okhttp.version>
<redisson-spring-boot-starter.version>3.17.1</redisson-spring-boot-starter.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<surefire-junit4.version>2.22.0</surefire-junit4.version>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>false</skipTests>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>${surefire-junit4.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down

0 comments on commit 6bb23e1

Please sign in to comment.