From 64af053a78d27ddd6cda2b8487db744b5dc95f09 Mon Sep 17 00:00:00 2001 From: Jonathan Clem Date: Mon, 18 May 2020 11:44:01 -0400 Subject: [PATCH] Add a test for running from a file --- .github/workflows/integration.yml | 11 +++++++++++ __test__/test-output.js | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 __test__/test-output.js diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b43f4e7..7c41682 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -1,4 +1,5 @@ on: + pull_request: {branches: master} push: {branches: master} jobs: @@ -15,3 +16,13 @@ jobs: if [[ "${{steps.output-set.outputs.result}}" != "output" ]]; then exit 1 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 diff --git a/__test__/test-output.js b/__test__/test-output.js new file mode 100644 index 0000000..3bcb9bd --- /dev/null +++ b/__test__/test-output.js @@ -0,0 +1,2 @@ +/* eslint-disable */ +return core.getInput('input-value')