diff --git a/packages/cache/__tests__/__fixtures__/action.yml b/packages/cache/__tests__/__fixtures__/action.yml index 7cd98502..a932e01b 100644 --- a/packages/cache/__tests__/__fixtures__/action.yml +++ b/packages/cache/__tests__/__fixtures__/action.yml @@ -1,5 +1,5 @@ name: 'Set env variables' description: 'Sets certain env variables so that e2e restore and save cache can be tested in a shell' runs: - using: 'node12' + using: 'node20' main: 'index.js' \ No newline at end of file diff --git a/packages/cache/__tests__/__fixtures__/index.js b/packages/cache/__tests__/__fixtures__/index.js index d5e28c0e..6ffdf760 100644 --- a/packages/cache/__tests__/__fixtures__/index.js +++ b/packages/cache/__tests__/__fixtures__/index.js @@ -1,8 +1,9 @@ // Certain env variables are not set by default in a shell context and are only available in a node context from a running action // In order to be able to restore and save cache e2e in a shell when running CI tests, we need these env variables set -const fs = require('fs'); -const os = require('os'); -const filePath = process.env[`GITHUB_ENV`] +import fs from 'fs' +import os from 'os' + +const filePath = process.env['GITHUB_ENV'] fs.appendFileSync(filePath, `ACTIONS_CACHE_SERVICE_V2=true${os.EOL}`, { encoding: 'utf8' })