Skip to content

Conversation

@jsoref
Copy link
Contributor

@jsoref jsoref commented Nov 25, 2024

The validate workflow needs to do three things:

  1. Prove that given only good files, validation passes (✅)
  2. Given a mix of good/bad files (in the dhall-files input), validation fails (❌)
  3. Given at least some bad files (in a file referenced by the dhall-file-list input), validation fails (❌)

Ideally, it does this in a manner that doesn't confuse people into thinking that a commit to the default branch is "broken". Unfortunately, negative testing is pretty confusing.

Previously, negative testing was done by setting continue-on-error: true at the job level, but that resulted in ❌s being shown on the commit.

This PR changes the logic so that only the uses: ./ step has continue-on-error: true.
Each job is given two outputs: validated: (the result of that step) and expected: (with the expected outcome for that step).

The check results job then collects all the results and compares them with their expected results. Because we can, it produces a pretty table.

Note that I intend to give the action itself pretty reporting at some time too, but that's outside the scope of this PR.

@jsoref jsoref requested a review from lzm0 November 25, 2024 22:49
@jsoref jsoref force-pushed the use-continue-on-error-at-step-level branch from cb2dcda to 5cba0bc Compare November 25, 2024 22:51
Because of the way yaml works, it's quite easy to end up with an empty
line, but that doesn't actually represent a file, and as such it should
be ignored...
@jsoref jsoref force-pushed the use-continue-on-error-at-step-level branch from 5cba0bc to 7f759b1 Compare February 26, 2025 21:34
@jsoref jsoref merged commit e525bd3 into dhall-validator:main Feb 26, 2025
3 of 5 checks passed
@jsoref jsoref deleted the use-continue-on-error-at-step-level branch March 6, 2025 17:58
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

Successfully merging this pull request may close these issues.

2 participants