diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-docker.yml similarity index 97% rename from .github/workflows/ci.yml rename to .github/workflows/ci-docker.yml index daf0d90..e09dc07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci-docker.yml @@ -1,4 +1,4 @@ -name: Continuous Integration +name: Continuous Integration - Docker on: pull_request: diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 6db2d3d..76ce775 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -19,6 +19,7 @@ jobs: outputs: comment-line: ${{ steps.action.outputs.test-action_comment-line }} + to-dont-read: ${{ steps.action.outputs.test-action_to-dont-read }} multiline: ${{ steps.action.outputs.test-action_multiline }} steps: - name: Checkout @@ -30,6 +31,12 @@ jobs: uses: ./ with: file-path: ./yq-test-action.yml + filtering-keys: | + test-action_comment-line + test-action_to-rename + test-action_multiline + renaming-outputs: | + test-action_to-rename=test-action_renamed test-action-output-comment-line: name: GitHub Actions Test Output - Comment Line @@ -45,12 +52,32 @@ jobs: id: test-output-comment-line run: | test_name="Test Output Comment Line" - expected_result="./app =" + expected="./app =" .github/scripts/test-action-output.sh \ "$test_name" \ - "$expected_result" \ + "$expected" \ "${{ needs.test-action.outputs.comment-line }}" + test-action-output-dont-read: + name: GitHub Actions Test Output - Don't Read + needs: test-action + runs-on: ubuntu-latest + + steps: + - name: Checkout + id: checkout + uses: actions/checkout@v4 + + - name: Test Output Don't Read + id: test-output-dont-read + run: | + test_name="Test Output Don't Read" + expected='' + .github/scripts/test-action-output.sh \ + "$test_name" \ + "$expected" \ + "${{ needs.test-action.outputs.to-dont-read }}" + test-action-output-multiline: name: GitHub Actions Test Output - Multiline needs: test-action @@ -65,9 +92,9 @@ jobs: id: test-output-multiline run: | test_name="Test Output Multiline" - expected_result="### Heading\n\n* Bullet C:\\\\ E:\\\n* Driver D:\\\n* Points" - expected_result=$(printf '%s' "${expected_result}" | sed -e 's/\\n/\n/g') + expected="### Heading\n\n* Bullet C:\\\n* Driver D:\\\\\n* Points" + expected=$(printf '%s' "${expected_result}" | sed -e 's/\\n/\n/g') .github/scripts/test-action-output.sh \ "$test_name" \ - "$expected_result" \ + "$expected" \ "${{ needs.test-action.outputs.multiline }}" diff --git a/yq-test-action.yml b/yq-test-action.yml index fd5e1a2..44dd5b1 100644 --- a/yq-test-action.yml +++ b/yq-test-action.yml @@ -1,9 +1,11 @@ test-action: # comment - comment-line: ./app = #comment line + comment-line: ./app = #comment line + to-dont-read: this is not read + to-rename: this is will be renamed multiline: | ### Heading - * Bullet C:\\ E:\ - * Driver D:\ + * Bullet C:\ + * Driver D:\\ * Points \ No newline at end of file