mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 12:07:26 +00:00
Add a test for running from a file
This commit is contained in:
parent
f498913621
commit
64af053a78
2 changed files with 13 additions and 0 deletions
11
.github/workflows/integration.yml
vendored
11
.github/workflows/integration.yml
vendored
|
|
@ -1,4 +1,5 @@
|
||||||
on:
|
on:
|
||||||
|
pull_request: {branches: master}
|
||||||
push: {branches: master}
|
push: {branches: master}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -15,3 +16,13 @@ jobs:
|
||||||
if [[ "${{steps.output-set.outputs.result}}" != "output" ]]; then
|
if [[ "${{steps.output-set.outputs.result}}" != "output" ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
- id: file-output-set
|
||||||
|
uses: actions/github-script@run-file
|
||||||
|
with:
|
||||||
|
file: __test__/test-output.js
|
||||||
|
result-encoding: string
|
||||||
|
input-value: output
|
||||||
|
- run: |
|
||||||
|
if [[ "${{steps.file-output-set.outputs.result}}" != "output" ]]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
|
||||||
2
__test__/test-output.js
Normal file
2
__test__/test-output.js
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
/* eslint-disable */
|
||||||
|
return core.getInput('input-value')
|
||||||
Loading…
Reference in a new issue