Compare commits

..

13 Commits

Author SHA1 Message Date
Vipul
01b0229624 Generate dist 2022-06-26 14:50:51 +00:00
Álvaro Mondéjar Rubio
c4678ef19f Fix linting 2022-06-21 13:42:12 +02:00
Álvaro Mondéjar Rubio
fe28a720e4 Fix prettier error 2022-06-21 13:33:41 +02:00
Álvaro Mondéjar Rubio
84dee78cdb EMpty commit to rerun CI 2022-06-21 10:06:36 +02:00
Álvaro Mondéjar Rubio
bd9fe45728 Empty commit tu rerun workflow 2022-02-22 12:37:06 +01:00
Álvaro Mondéjar
e9d6e93306 Double check if CI is failing properly 2020-11-28 20:45:38 +01:00
Álvaro Mondéjar
a89dcfa06d Update dist folder 2020-11-28 20:39:41 +01:00
Álvaro Mondéjar
114965806a Fix lint issue 2020-11-28 20:37:09 +01:00
Álvaro Mondéjar
2bdaf00273 Sort inputs and remove whitespaces after exclamation at the beginning of lines 2020-11-28 20:34:06 +01:00
Konrad Pabjan
9c77c9dbfc Merge pull request #470 from brcrista/patch-1
Add CODEOWNERS file
2020-11-25 15:25:27 -05:00
Brian Cristante
29cdd22c60 Create CODEOWNERS 2020-11-25 15:14:18 -05:00
David Hadka
0781355a23 Upgrade @actions/cache to 1.0.4 (#451) 2020-11-06 08:23:07 -06:00
David Hadka
22c64ac772 Update @actions/core to 1.2.6 (#449) 2020-11-03 13:04:09 -06:00
9 changed files with 50524 additions and 45367 deletions

1
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1 @@
* @artifacts-actions

View File

@@ -1,6 +1,6 @@
--- ---
name: "@actions/cache" name: "@actions/cache"
version: 1.0.3 version: 1.0.4
type: npm type: npm
summary: Actions cache lib summary: Actions cache lib
homepage: https://github.com/actions/toolkit/tree/main/packages/cache homepage: https://github.com/actions/toolkit/tree/main/packages/cache

View File

@@ -213,6 +213,39 @@ test("getInputAsArray handles empty lines correctly", () => {
expect(actionUtils.getInputAsArray("foo")).toEqual(["bar", "baz"]); expect(actionUtils.getInputAsArray("foo")).toEqual(["bar", "baz"]);
}); });
test("getInputAsArray sorts files correctly", () => {
testUtils.setInput(
"foo",
"bar\n!baz\nwaldo\nqux\nquux\ncorge\ngrault\ngarply"
);
expect(actionUtils.getInputAsArray("foo")).toEqual([
"!baz",
"bar",
"corge",
"garply",
"grault",
"quux",
"qux",
"waldo"
]);
});
test("getInputAsArray removes spaces after ! at the beginning", () => {
testUtils.setInput(
"foo",
"! bar\n! baz\n! qux\n!quux\ncorge\ngrault! garply\n!\r\t waldo"
);
expect(actionUtils.getInputAsArray("foo")).toEqual([
"!bar",
"!baz",
"!quux",
"!qux",
"!waldo",
"corge",
"grault! garply"
]);
});
test("getInputAsInt returns undefined if input not set", () => { test("getInputAsInt returns undefined if input not set", () => {
expect(actionUtils.getInputAsInt("undefined")).toBeUndefined(); expect(actionUtils.getInputAsInt("undefined")).toBeUndefined();
}); });

View File

@@ -97,7 +97,7 @@ test("restore with no key", async () => {
test("restore with too many keys should fail", async () => { test("restore with too many keys should fail", async () => {
const path = "node_modules"; const path = "node_modules";
const key = "node-test"; const key = "node-test";
const restoreKeys = [...Array(20).keys()].map(x => x.toString()); const restoreKeys = [...Array(20).keys()].map(x => x.toString()).sort();
testUtils.setInputs({ testUtils.setInputs({
path: path, path: path,
key, key,

47919
dist/restore/index.js vendored

File diff suppressed because one or more lines are too long

47919
dist/save/index.js vendored

File diff suppressed because one or more lines are too long

8
package-lock.json generated
View File

@@ -5,11 +5,11 @@
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@actions/cache": { "@actions/cache": {
"version": "1.0.3", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.3.tgz", "resolved": "https://registry.npmjs.org/@actions/cache/-/cache-1.0.4.tgz",
"integrity": "sha512-2DcdMrqbfj5LcsEYIh6ACgjb0bNMeMPP7y1a+bf/Sk0MFfkkrYRNFihkXRV6v0TNkNo0b5X38xmUguRZ5ZPLbw==", "integrity": "sha512-1grYfbu8P6JDDHc40eOI5tQDRcAxMwq5HBWhaCqEg9o/ixDRZfwPHlQvQAop2ZzFCjF2ns0ENQOIBAH8GNn+zA==",
"requires": { "requires": {
"@actions/core": "^1.2.4", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.0.1",
"@actions/glob": "^0.1.0", "@actions/glob": "^0.1.0",
"@actions/http-client": "^1.0.9", "@actions/http-client": "^1.0.9",

View File

@@ -23,7 +23,7 @@
"author": "GitHub", "author": "GitHub",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/cache": "^1.0.3", "@actions/cache": "^1.0.4",
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/exec": "^1.0.1", "@actions/exec": "^1.0.1",
"@actions/io": "^1.0.1" "@actions/io": "^1.0.1"

View File

@@ -60,8 +60,9 @@ export function getInputAsArray(
return core return core
.getInput(name, options) .getInput(name, options)
.split("\n") .split("\n")
.map(s => s.trim()) .map(s => s.replace(/^!\s+/, "!").trim())
.filter(x => x !== ""); .filter(x => x !== "")
.sort();
} }
export function getInputAsInt( export function getInputAsInt(