Skip to content

Test special chars #141

Test special chars

Test special chars #141

name: Test special chars
on:
# # Uncomment when test added first time to register workflow and comment it back after workflow would be registered
# #
# # Added pull_request to register workflow from the PR.
# # Read more https://stackoverflow.com/questions/63362126/github-actions-how-to-run-a-workflow-created-on-a-non-master-branch-from-the-wo
# pull_request: {}
workflow_dispatch:
inputs:
paths:
description: 'A multiline yaml string of key/value pairs for each Name and Path to include in the comment'
required: false
default: |
Application: application
Dashboard: /dashboard
jobs:
setup:
runs-on: ubuntu-latest
strategy:
matrix:
target: ["one", "two"]
steps:
- name: Setup
run: echo "Do setup"
- name: Checkout
uses: actions/checkout@v4
- uses: ./
id: writer
with:
matrix-step-name: ${{ github.job }}
matrix-key: ${{ matrix.target }}
outputs: |-
result2: ${{ matrix.target }}
test: "comment: URL for deploy: https://frontend-docs-259.website.dev"
test2: "comment: URL for deploy: ' https://frontend-docs-259.website.dev"
test3: ${{ toJson(inputs.paths) }}
- uses: nick-fields/assert-action@v2
with:
expected: ${{ matrix.target }}
actual: ${{ fromJson(steps.writer.outputs.result).result2 }}
- uses: nick-fields/assert-action@v2
with:
expected: ${{ matrix.target }}
actual: ${{ steps.writer.outputs.result2 }}
- uses: nick-fields/assert-action@v2
with:
expected: "comment: URL for deploy: https://frontend-docs-259.website.dev"
actual: ${{ fromJson(steps.writer.outputs.result).test }}
- uses: nick-fields/assert-action@v2
with:
expected: "comment: URL for deploy: https://frontend-docs-259.website.dev"
actual: ${{ steps.writer.outputs.test }}
- uses: nick-fields/assert-action@v2
with:
expected: "comment: URL for deploy: ' https://frontend-docs-259.website.dev"
actual: ${{ fromJson(steps.writer.outputs.result).test2 }}
- uses: nick-fields/assert-action@v2
with:
expected: "comment: URL for deploy: ' https://frontend-docs-259.website.dev"
actual: ${{ steps.writer.outputs.test2 }}
- uses: nick-fields/assert-action@v2
with:
expected: |
Application: application
Dashboard: /dashboard
actual: ${{ fromJson(steps.writer.outputs.result).test3 }}
- uses: nick-fields/assert-action@v2
with:
expected: |
Application: application
Dashboard: /dashboard
actual: ${{ steps.writer.outputs.test3 }}
test:
runs-on: ubuntu-latest
continue-on-error: true
needs: [setup]
steps:
- uses: actions/download-artifact@v4
- id: current
run: |-
ls -la ./
echo "result=$(ls | wc -l)" >> $GITHUB_OUTPUT
outputs:
outcome: "${{ steps.current.outcome }}"
result: "${{ steps.current.outputs.result }}"
assert:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: nick-fields/assert-action@v2
with:
expected: '2'
actual: "${{ needs.test.outputs.result }}"
- uses: nick-fields/assert-action@v2
with:
expected: 'success'
actual: "${{ needs.test.outputs.outcome }}"
teardown:
runs-on: ubuntu-latest
needs: [assert]
if: ${{ always() }}
steps:
- name: Tear down
run: echo "Do Tear down"