cargo-semver-checks/.github/workflows/test-action.yml
Mieszko Grodzicki 43d6c89249
Remove TODOs from workflows. (#35)
* Remove TODOs from workflows.

* Remove TODO in test-cache.yml
2023-04-08 10:19:56 -04:00

46 lines
1.3 KiB
YAML

name: Smoke test the action
# Assumes that the latest published normal version of `ref_slice` not greater
# than 1.2.1 is 1.2.1 itself.
on:
workflow_call:
inputs:
runs-on:
required: true
type: string
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
run-tests:
name: Run tests
runs-on: ${{ inputs.runs-on }}
steps:
- name: Checkout the test repository and test with patch change and patch version bump
uses: actions/checkout@v3
with:
repository: mgr0dzicki/cargo-semver-action-ref-slice
ref: patch_change
persist-credentials: true
- name: Checkout the action
uses: actions/checkout@v3
with:
path: action
- name: Run the action
uses: ./action/
- name: Checkout the test with major change and patch version bump
run: |
git fetch origin major_change
git checkout major_change
- name: Run the action (allowed to fail)
id: action_major
uses: ./action/
continue-on-error: true
- name: Fail if the action has not returned any errors (but it should have)
if: steps.action_major.outcome != 'failure'
run: |
echo "Error! The action should have failed because of the breaking change, but it has not."
exit 1