-
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.
whether they work is to be seen
- Loading branch information
Showing
4 changed files
with
106 additions
and
12 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,43 @@ | ||
name: Default test | ||
description: Check that the default setting works and that the action may be run multiple times | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Rust 1.74.1 (without default) | ||
id: toolchain-1-74-1 | ||
uses: ./ | ||
with: | ||
toolchain: 1.74.1 | ||
|
||
- name: Install Rust 1.75.0 (with default) | ||
id: toolchain-1-75-0 | ||
uses: ./ | ||
with: | ||
toolchain: 1.75.0 | ||
default: true | ||
|
||
- name: 1.74.1 cache key | ||
run: echo '${{steps.toolchain-1-74-1.outputs.cachekey}}' | ||
shell: bash | ||
|
||
- name: 1.75.0 cache key | ||
run: echo '${{steps.toolchain-1-75-0.outputs.cachekey}}' | ||
shell: bash | ||
|
||
- name: Default rustc version | ||
run: rustc --version | ||
shell: bash | ||
|
||
- name: Check 1.74.1 cache key | ||
run: cmp -s <(echo ${{steps.toolchain-1-74-1.outputs.cachekey}}) <(echo PLACEHOLDER) | ||
shell: bash | ||
|
||
- name: Check 1.75.0 cache key | ||
run: cmp -s <(echo ${{steps.toolchain-1-75-0.outputs.cachekey}}) <(echo PLACEHOLDER) | ||
shell: bash | ||
|
||
- name: Check default rustc version | ||
run: cmp -s <(rustc --version) <(echo PLACEHOLDER) | ||
shell: bash | ||
|
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,32 @@ | ||
name: Override test | ||
description: Check that the override setting works | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Rust stable | ||
id: toolchain | ||
uses: ./ | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Stable cache key | ||
run: echo '${{steps.toolchain.outputs.cachekey}}' | ||
shell: bash | ||
|
||
- name: Stable rustc version | ||
id: rustc | ||
run: | | ||
echo "version=$(rustc --version)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
|
||
- run: cargo init . --bin --name test | ||
shell: bash | ||
|
||
- run: echo '1.70.0' > rust-toolchain | ||
shell: bash | ||
|
||
- name: Check rustc version is overridden | ||
run: cmp -s <(rustc --version) <(echo ${{steps.rustc.outputs.version}}) | ||
shell: bash |