Skip to content

Commit

Permalink
Fix the ref-slice job on Linux, make it actually check stuff on Windo…
Browse files Browse the repository at this point in the history
…ws (#425)

* Fix the ref-slice job on Linux, see if it works on Windows.

* Fix the action on Windows as well.
  • Loading branch information
obi1kenobi authored Apr 9, 2023
1 parent 72ae215 commit 18027af
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
workspaces: |
subject/target/semver-checks/local-ref_slice-1_2_2/
subject/target/semver-checks/local-ref_slice-1_2_1/
- name: Run semver-checks
continue-on-error: true
Expand All @@ -1199,7 +1199,7 @@ jobs:
- name: Baseline is correct
run: |
cd semver
EXPECTED="$(echo -e " Checking ref_slice v1.2.1 -> v1.2.2 (patch change)")"
EXPECTED="$(echo -e " Checking ref_slice v1.2.1 -> v1.2.1 (no change)")"
# Strip ANSI escapes for colors and bold text before comparing.
RESULT="$(cat output | grep ' -> v1.' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g")"
diff <(echo "$RESULT") <(echo "$EXPECTED")
Expand Down Expand Up @@ -1273,7 +1273,7 @@ jobs:
uses: Swatinem/rust-cache@v2
with:
workspaces: |
subject\target\semver-checks\local-ref_slice-1_2_2\
subject\target\semver-checks\local-ref_slice-1_2_1\
- name: Run cargo-semver-checks
continue-on-error: true
Expand All @@ -1291,17 +1291,19 @@ jobs:
- name: Baseline is correct
run: |
cd semver
$EXPECTED = " Checking ref_slice v1.2.1 -> v1.2.2 (patch change)"
$EXPECTED = " Checking ref_slice v1.2.1 -> v1.2.1 (no change)"
# Strip ANSI escapes for colors and bold text before comparing.
$RESULT = (cat output | grep 'ref_slice v1.' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g") | Out-String
compare $RESULT $EXPECTED
cat output | grep ' -> v1.' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | Out-File -FilePath check_line
cat check_line
grep "$EXPECTED" check_line
- name: Semver break found
run: |
cd semver
$EXPECTED = "--- failure function_missing: pub fn removed or renamed ---"
$RESULT = (cat output | grep failure)
compare $RESULT $EXPECTED
cat output | grep failure | Out-File -FilePath failure_line
cat failure_line
grep "$EXPECTED" failure_line
# Ensure the following fragment (not full line!) is in the output file:
grep ' function ref_slice::ref_slice, previously in file' output
Expand Down

0 comments on commit 18027af

Please # to comment.