diff --git a/action.yml b/action.yml index fb6fb1d..7f753d0 100644 --- a/action.yml +++ b/action.yml @@ -15,6 +15,6 @@ inputs: default: "/var/tmp" runs: - using: 'node16' + using: 'node20' main: 'dist/run-tests/index.js' post: 'dist/run-post-actions/index.js' diff --git a/src/index.js b/src/index.js index 02d52c1..de62b82 100644 --- a/src/index.js +++ b/src/index.js @@ -27,8 +27,9 @@ const uploadArtifacts = async (diffpath) => { return; } - const globber = await glob.create(`${diffpath}/**`); + const globber = await glob.create(`${diffpath}/**`, {}); const filepaths = await globber.glob(); + const processedFilepaths = filepaths.filter((path) => path); if (filepaths.length === 0) { return; @@ -37,9 +38,9 @@ const uploadArtifacts = async (diffpath) => { const artifactClient = new DefaultArtifactClient(); const artifactName = 'test-results'; console.log('22222222222222222222222222222222222'); - console.log({ artifactName, filepaths, diffpath }); + console.log({ artifactName, processedFilepaths, diffpath }); console.log('22222222222222222222222222222222222222222'); - await artifactClient.uploadArtifact(artifactName, filepaths, diffpath); + await artifactClient.uploadArtifact(artifactName, processedFilepaths, diffpath); // NOTE: Users need notification that screenshots have been generated. Not error. core.info(colors.bgYellow.black('Download snapshots from Artifacts.')); };