未验证 提交 50e9f291 编写于 作者: X xiangzihao 提交者: GitHub

[CI] bumping actions/cache to v3 to fix ci error (#10345)

* bumping actions/cache to v3

* fix JSONUtilsTest.java unit test error
上级 d1c47c99
......@@ -63,7 +63,7 @@ jobs:
submodules: true
- name: Sanity Check
uses: ./.github/actions/sanity-check
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven
......
......@@ -55,7 +55,7 @@ jobs:
- name: Sanity Check
uses: ./.github/actions/sanity-check
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
......@@ -127,7 +127,7 @@ jobs:
with:
submodules: true
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
......
......@@ -35,7 +35,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
......
......@@ -127,7 +127,7 @@ jobs:
- name: Sanity Check
uses: ./.github/actions/sanity-check
- name: Cache local Maven repository
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
......
......@@ -65,7 +65,7 @@ jobs:
with:
java-version: 8
distribution: 'adopt'
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven
......
......@@ -262,7 +262,7 @@ public class JSONUtilsTest {
@Test
public void dateToString() {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
String time = "2022-02-22 13:38:24";
Date date = DateUtils.stringToDate(time);
String json = JSONUtils.toJsonString(date);
......@@ -274,7 +274,7 @@ public class JSONUtilsTest {
@Test
public void stringToDate() {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
String json = "\"2022-02-22 13:38:24\"";
Date date = JSONUtils.parseObject(json, Date.class);
Assert.assertEquals(date, DateUtils.stringToDate("2022-02-22 13:38:24"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册