Various assertions to aide in validating action outputs
NOTE: Ownership of this project was transferred to my personal account nick-fields from my work account nick-invision. Details here
Required Expected value
Required Actual value
Optional Type of comparison to perform. Supports exact (default), startsWith, endsWith, contains, notEqual, notStartsWith, notEndsWith, notContains
Result of the comparison. Can be either passed or failed
- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: testing
actual: ${{ steps.test-data.outputs.value }}- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: testing
actual: ${{ steps.test-data.outputs.value }}
comparison: exact- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: test
actual: ${{ steps.test-data.outputs.value }}
comparison: startsWith- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: abc
actual: ${{ steps.test-data.outputs.value }}
comparison: notStartsWith- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: ing
actual: ${{ steps.test-data.outputs.value }}
comparison: endsWith- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: abc
actual: ${{ steps.test-data.outputs.value }}
comparison: notEndsWith- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: est
actual: ${{ steps.test-data.outputs.value }}
comparison: endsWith- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: abc
actual: ${{ steps.test-data.outputs.value }}
comparison: notContains- id: test-data
run: echo "value=testing" >> $GITHUB_OUTPUT
- uses: nick-fields/assert-action@v4
with:
expected: abc
actual: ${{ steps.test-data.outputs.value }}
comparison: notEqual- If running on self-hosted runner, NodeJS must be installed.