Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Assert actual matches expected using dynamic assertions #1

Closed
6 of 8 tasks
shrink opened this issue Jun 1, 2021 · 0 comments
Closed
6 of 8 tasks

WIP: Assert actual matches expected using dynamic assertions #1

shrink opened this issue Jun 1, 2021 · 0 comments
Assignees
Milestone

Comments

@shrink
Copy link
Member

shrink commented Jun 1, 2021

Assertions in a workflow are valuable, especially in workflows for validating the behaviour of an action. There's a fantastic action Assert Action however it is limited to a fixed set of string based assertions.

  • A Workflow can include custom assertions defined in the repository
  • expected, actual
- uses: pr-mpt/actions-assert
  with: 
    expected: "Hello, World!"
    actual: "${{ steps.message.outputs.greeting }}"
    assertion: "is-equal"
    type: boolean|string|int|json
    each: true # should we iterate through a new line delimited list

Features

  • Configurable type (integer, boolean, string)
  • Accepts external assertions from npm packages and the repository
  • Results include messages

Assertions

Questions

  • An assertion might have more complex configuration, how do we provide that? Some sort of hacky nested json driven with for config? e.g: an http request might require a bearer token -> environment variables
@shrink shrink self-assigned this Jun 1, 2021
@shrink shrink added this to the v1.0.0 milestone Jun 3, 2021
@shrink shrink closed this as completed Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant