Cleaning, both tests in single job.

This commit is contained in:
Mieszko Grodzicki 2022-12-31 13:03:06 +01:00 committed by Predrag Gruevski
parent 58fab5bd52
commit 5801563129

View file

@ -11,43 +11,32 @@ env:
CARGO_TERM_COLOR: always
jobs:
run-on-patch-change:
name: Test without semver violation
test-action:
name: Test the action
runs-on: ubuntu-latest
steps:
- name: Checkout test repo
- name: Checkout test repository
uses: actions/checkout@v3
with:
repository: mgr0dzicki/cargo-semver-action-ref-slice
ref: patch_change
persist-credentials: true
- name: Checkout action
uses: actions/checkout@v3
with:
path: action
# test without semver violation
- name: Checkout branch patch_change
run: git checkout patch_change
- name: Run action
id: action
uses: ./action/
run-on-major-change:
name: Test with semver violation
runs-on: ubuntu-latest
steps:
- name: Checkout test repo
uses: actions/checkout@v3
with:
repository: mgr0dzicki/cargo-semver-action-ref-slice
ref: major_change
persist-credentials: true
- name: Checkout action
uses: actions/checkout@v3
with:
path: action
# test with semver violation
- name: Checkout branch major_change
run: git checkout major_change
- name: Run action
id: action
uses: ./action/
continue-on-error: true
- name: Debug print steps
run: echo '${{ toJSON(steps) }}'
- name: Check if the action failed
if: steps.action.outcome != 'failure'
run: exit 1