mirror of
https://github.com/obi1kenobi/cargo-semver-checks-action.git
synced 2024-11-21 15:49:30 +01:00
Nightly support is best-effort. Its CI steps are advisory, not required. (#83)
* Nightly support is best-effort. Its CI steps are advisory, not required. * Avoid use of nightly Rust in `test-inputs.yml` tests.
This commit is contained in:
parent
70850f22aa
commit
37af5d4093
2 changed files with 35 additions and 23 deletions
16
.github/workflows/test-action.yml
vendored
16
.github/workflows/test-action.yml
vendored
|
@ -14,8 +14,20 @@ jobs:
|
||||||
name: Run tests
|
name: Run tests
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
|
||||||
toolchain: ['1.74', 'stable', 'beta', 'nightly']
|
toolchain: ['1.74', '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 }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the test repository and test with patch change and patch version bump
|
- name: Checkout the test repository and test with patch change and patch version bump
|
||||||
|
|
42
.github/workflows/test-inputs.yml
vendored
42
.github/workflows/test-inputs.yml
vendored
|
@ -102,7 +102,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
package: rio_api, rio_turtle
|
package: rio_api, rio_turtle
|
||||||
feature-group: only-explicit-features
|
feature-group: only-explicit-features
|
||||||
feature: generalized
|
features: generalized
|
||||||
|
|
||||||
test-exclude:
|
test-exclude:
|
||||||
name: Test input exclude
|
name: Test input exclude
|
||||||
|
@ -271,14 +271,14 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: action
|
path: action
|
||||||
- name: Install latest beta
|
- name: Install latest stable
|
||||||
uses: dtolnay/rust-toolchain@beta
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Set local override to beta
|
- name: Set local override to stable
|
||||||
run: rustup override set beta
|
run: rustup override set stable
|
||||||
- name: Run the action with rust-toolchain set to nightly
|
- name: Run the action with rust-toolchain set to beta
|
||||||
uses: ./action/
|
uses: ./action/
|
||||||
with:
|
with:
|
||||||
rust-toolchain: nightly
|
rust-toolchain: beta
|
||||||
- name: Get cache key
|
- name: Get cache key
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
id: get-cache-key
|
id: get-cache-key
|
||||||
|
@ -290,14 +290,14 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
semver-${{ github.job }}
|
semver-${{ github.job }}
|
||||||
- name: Fail if the toolchain used by the action is invalid
|
- name: Fail if the toolchain used by the action is invalid
|
||||||
if: ${{ ! contains(steps.get-cache-key.outputs.cache-matched-key, 'nightly') }}
|
if: ${{ ! contains(steps.get-cache-key.outputs.cache-matched-key, 'beta') }}
|
||||||
run: |
|
run: |
|
||||||
echo "The toolchain used by the action should be nightly, but it is not!"
|
echo "The toolchain used by the action should be beta, but it is not!"
|
||||||
exit 1
|
exit 1
|
||||||
- name: Check the active toolchain
|
- name: Check the active toolchain
|
||||||
run: |
|
run: |
|
||||||
if ! rustup show active-toolchain | grep -q "beta"; then
|
if ! rustup show active-toolchain | grep -q "stable"; then
|
||||||
echo "The active toolchain should be still beta, but it is $(rustup show active-toolchain)!"
|
echo "The active toolchain should be still stable, but it is $(rustup show active-toolchain)!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -314,14 +314,14 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: action
|
path: action
|
||||||
- name: Install latest beta
|
- name: Install latest stable
|
||||||
uses: dtolnay/rust-toolchain@beta
|
uses: dtolnay/rust-toolchain@stable
|
||||||
- name: Set override to beta in rust-toolchain.toml file
|
- name: Set override to stable in rust-toolchain.toml file
|
||||||
run: echo -e "[toolchain]\nchannel = \"beta\"" > rust-toolchain.toml
|
run: echo -e "[toolchain]\nchannel = \"stable\"" > rust-toolchain.toml
|
||||||
- name: Run the action with rust-toolchain set to nightly
|
- name: Run the action with rust-toolchain set to beta
|
||||||
uses: ./action/
|
uses: ./action/
|
||||||
with:
|
with:
|
||||||
rust-toolchain: nightly
|
rust-toolchain: beta
|
||||||
- name: Get cache key
|
- name: Get cache key
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
id: get-cache-key
|
id: get-cache-key
|
||||||
|
@ -333,14 +333,14 @@ jobs:
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
semver-${{ github.job }}
|
semver-${{ github.job }}
|
||||||
- name: Fail if the toolchain used by the action is invalid
|
- name: Fail if the toolchain used by the action is invalid
|
||||||
if: ${{ ! contains(steps.get-cache-key.outputs.cache-matched-key, 'nightly') }}
|
if: ${{ ! contains(steps.get-cache-key.outputs.cache-matched-key, 'beta') }}
|
||||||
run: |
|
run: |
|
||||||
echo "The toolchain used by the action should be nightly, but it is not!"
|
echo "The toolchain used by the action should be beta, but it is not!"
|
||||||
exit 1
|
exit 1
|
||||||
- name: Check the active toolchain
|
- name: Check the active toolchain
|
||||||
run: |
|
run: |
|
||||||
if ! rustup show active-toolchain | grep -q "beta"; then
|
if ! rustup show active-toolchain | grep -q "stable"; then
|
||||||
echo "The active toolchain should be still beta, but it is $(rustup show active-toolchain)!"
|
echo "The active toolchain should be still stable, but it is $(rustup show active-toolchain)!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue