-
-
Notifications
You must be signed in to change notification settings - Fork 16
61 lines (57 loc) · 1.86 KB
/
test-action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Smoke test the action
# Assumes that the latest published normal version of `ref_slice` not greater
# than 1.2.1 is 1.2.1 itself.
on:
workflow_call:
env:
RUST_BACKTRACE: 1
jobs:
run-tests:
name: Run tests
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
toolchain: ["1.81", "stable", "beta"]
experimental: [false]
include:
- os: 'ubuntu-latest'
toolchain: 'nightly'
experimental: true
- os: 'windows-latest'
toolchain: 'nightly'
experimental: true
- os: 'macos-latest'
toolchain: 'nightly'
experimental: true
continue-on-error: ${{ matrix.experimental }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout the test repository and test with patch change and patch version bump
uses: actions/checkout@v4
with:
repository: mgr0dzicki/cargo-semver-action-ref-slice
ref: patch_change
persist-credentials: true
- name: Checkout the action
uses: actions/checkout@v4
with:
path: action
- name: Run the action
uses: ./action/
with:
rust-toolchain: ${{ matrix.toolchain }}
- name: Checkout the test with major change and patch version bump
run: |
git fetch origin major_change
git checkout major_change
- name: Run the action (expected to fail)
id: action_major
uses: ./action/
with:
rust-toolchain: ${{ matrix.toolchain }}
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