Skip to content

Commit bcc23b9

Browse files
Aiqiao YanAiqiao Yan
Aiqiao Yan
authored and
Aiqiao Yan
committed
React to feeback and change to use 0.2.0 cache package
1 parent 249a220 commit bcc23b9

File tree

10 files changed

+7301
-7807
lines changed

10 files changed

+7301
-7807
lines changed

.github/workflows/workflow.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ on:
44
pull_request:
55
branches:
66
- master
7+
- releases/**
78
paths-ignore:
89
- '**.md'
910
push:
1011
branches:
1112
- master
13+
- releases/**
1214
paths-ignore:
1315
- '**.md'
1416

@@ -17,7 +19,7 @@ jobs:
1719
build:
1820
strategy:
1921
matrix:
20-
os: [ubuntu-latest, ubuntu-16.04]
22+
os: [ubuntu-latest, ubuntu-16.04, windows-latest, macOS-latest]
2123
fail-fast: false
2224
runs-on: ${{ matrix.os }}
2325
steps:
@@ -61,7 +63,7 @@ jobs:
6163
test-save:
6264
strategy:
6365
matrix:
64-
os: [ubuntu-latest, ubuntu-16.04]
66+
os: [ubuntu-latest, ubuntu-16.04, windows-latest, macOS-latest]
6567
fail-fast: false
6668
runs-on: ${{ matrix.os }}
6769
steps:
@@ -84,7 +86,7 @@ jobs:
8486
needs: test-save
8587
strategy:
8688
matrix:
87-
os: [ubuntu-latest, ubuntu-16.04]
89+
os: [ubuntu-latest, ubuntu-16.04, windows-latest, macOS-latest]
8890
fail-fast: false
8991
runs-on: ${{ matrix.os }}
9092
steps:

__tests__/actionUtils.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ test("setOutputAndState with exact match to set cache-hit output and state", ()
7979
expect(setOutputMock).toHaveBeenCalledWith(Outputs.CacheHit, "true");
8080
expect(setOutputMock).toHaveBeenCalledTimes(1);
8181

82-
expect(saveStateMock).toHaveBeenCalledWith(State.CacheResult, cacheKey);
82+
expect(saveStateMock).toHaveBeenCalledWith(State.CacheMatchedKey, cacheKey);
8383
expect(saveStateMock).toHaveBeenCalledTimes(1);
8484
});
8585

@@ -95,7 +95,7 @@ test("setOutputAndState with no exact match to set cache-hit output and state",
9595
expect(setOutputMock).toHaveBeenCalledWith(Outputs.CacheHit, "false");
9696
expect(setOutputMock).toHaveBeenCalledTimes(1);
9797

98-
expect(saveStateMock).toHaveBeenCalledWith(State.CacheResult, cacheKey);
98+
expect(saveStateMock).toHaveBeenCalledWith(State.CacheMatchedKey, cacheKey);
9999
expect(saveStateMock).toHaveBeenCalledTimes(1);
100100
});
101101

@@ -109,7 +109,7 @@ test("getCacheState with no state returns undefined", () => {
109109

110110
expect(state).toBe(undefined);
111111

112-
expect(getStateMock).toHaveBeenCalledWith(State.CacheResult);
112+
expect(getStateMock).toHaveBeenCalledWith(State.CacheMatchedKey);
113113
expect(getStateMock).toHaveBeenCalledTimes(1);
114114
});
115115

@@ -125,7 +125,7 @@ test("getCacheState with valid state", () => {
125125

126126
expect(state).toEqual(cacheKey);
127127

128-
expect(getStateMock).toHaveBeenCalledWith(State.CacheResult);
128+
expect(getStateMock).toHaveBeenCalledWith(State.CacheMatchedKey);
129129
expect(getStateMock).toHaveBeenCalledTimes(1);
130130
});
131131

0 commit comments

Comments
 (0)