mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-23 00:19:32 +01:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
run-on-patch-change:
|
|
name: Test without semver violation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout test repo
|
|
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
|
|
- name: Run 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
|
|
- name: Run 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
|