mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-03-20 12:12:35 +08:00
Add docs and tests
This commit is contained in:
5
packages/cache/__tests__/__fixtures__/action.yml
vendored
Normal file
5
packages/cache/__tests__/__fixtures__/action.yml
vendored
Normal file
@@ -0,0 +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'
|
||||
main: 'index.js'
|
||||
5
packages/cache/__tests__/__fixtures__/index.js
vendored
Normal file
5
packages/cache/__tests__/__fixtures__/index.js
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
// 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
|
||||
console.log(`::set-env name=ACTIONS_RUNTIME_URL::${process.env.ACTIONS_RUNTIME_URL}`)
|
||||
console.log(`::set-env name=ACTIONS_RUNTIME_TOKEN::${process.env.ACTIONS_RUNTIME_TOKEN}`)
|
||||
console.log(`::set-env name=GITHUB_RUN_ID::${process.env.GITHUB_RUN_ID}`)
|
||||
Reference in New Issue
Block a user