forked from obi1kenobi/cargo-semver-checks-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a708ddc
commit 893685e
Showing
11 changed files
with
3,863 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Test the action | ||
|
||
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 | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: mgr0dzicki/cargo-semver-action-ref-slice | ||
fetch-depth: 0 | ||
persist-credentials: true | ||
- name: Checkout the action | ||
uses: actions/checkout@v3 | ||
with: | ||
path: action | ||
# Assumes that the latest published normal version of `ref_slice` smaller | ||
# than 1.2.2 is 1.2.1. | ||
# TODO: Change the crate version in the corresponding branch `patch_change` | ||
# to 1.2.1 once new logic of choosing baseline is adapted. Otherwise | ||
# if new version 1.2.2 of `ref_slice` is released, the tests might stop | ||
# working correctly. | ||
- name: Checkout the test with patch change and patch version bump | ||
run: git checkout patch_change | ||
- name: Run the action | ||
uses: ./action/ | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
# Assumes that the latest published normal version of `ref_slice` smaller | ||
# than 1.2.2 exports a public function `ref_slice`. | ||
# TODO: Change the crate version in the corresponding branch `major_change` | ||
# to 1.2.1 once new logic of choosing baseline is adapted. Otherwise | ||
# if new version 1.2.2 of `ref_slice` is released, the tests might stop | ||
# working correctly. | ||
- name: Checkout the test with major change and patch version bump | ||
run: git checkout major_change | ||
- name: Run the action (allowed to fail) | ||
id: action_major | ||
uses: ./action/ | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.idea | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@actions-rs:registry=https://npm.pkg.github.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.