mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-23 00:19:32 +01:00
42 lines
1,021 B
YAML
42 lines
1,021 B
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
RUST_BACKTRACE: 1
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test-action:
|
|
name: Test the action
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout test repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: mgr0dzicki/cargo-semver-action-ref-slice
|
|
fetch-depth: 0
|
|
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
|
|
uses: ./action/
|
|
# test with semver violation
|
|
- name: Checkout branch major_change
|
|
run: git checkout major_change
|
|
- name: Run action
|
|
id: action_major
|
|
uses: ./action/
|
|
continue-on-error: true
|
|
- name: Check if the action failed
|
|
if: steps.action_major.outcome != 'failure'
|
|
run: exit 1
|