Skip to content

Commit

Permalink
clean up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wackbyte committed Jan 20, 2024
1 parent c4bc6bb commit 5460523
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 23 deletions.
12 changes: 2 additions & 10 deletions tests/default/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,19 @@ description: Check that the default setting works and that the action may be run
runs:
using: composite
steps:
- name: Install Rust 1.74.1 (without default)
- name: Install Rust 1.74.1
id: toolchain-1-74-1
uses: ./
with:
toolchain: 1.74.1

- name: Install Rust 1.75.0 (with default)
- name: Install Rust 1.75.0 as 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
Expand Down
8 changes: 2 additions & 6 deletions tests/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,15 @@ runs:
with:
toolchain: ${{inputs.toolchain}}

- name: Cache key
run: echo '${{steps.toolchain.outputs.cachekey}}'
- name: Default rustc version
run: rustc --version
shell: bash

- name: Check cache key
if: inputs.toolchain == '1.62.0'
run: cmp -s <(echo ${{steps.toolchain.outputs.cachekey}}) <(echo 20220627a831)
shell: bash

- name: rustc version
run: rustc --version
shell: bash

- run: cargo init . --bin --name ci
if: inputs.toolchain == 'nightly' || inputs.toolchain == 'beta' || inputs.toolchain == 'stable'
shell: bash
Expand Down
10 changes: 3 additions & 7 deletions tests/override/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,14 @@ description: Check that the override setting works
runs:
using: composite
steps:
- name: Install Rust stable
- name: Install Rust stable and override
id: toolchain
uses: ./
with:
toolchain: stable
override: true

- name: Stable cache key
run: echo '${{steps.toolchain.outputs.cachekey}}'
shell: bash

- name: Stable rustc version
- name: Store default rustc version
id: rustc-version
run: |
echo "output=$(rustc --version)" >> $GITHUB_OUTPUT
Expand All @@ -27,6 +23,6 @@ runs:
- run: echo '1.70.0' > rust-toolchain
shell: bash

- name: Check rustc version is overridden
- name: Check default rustc version is overridden
run: cmp -s <(rustc --version) <(echo '${{steps.rustc-version.outputs.output}}')
shell: bash

0 comments on commit 5460523

Please sign in to comment.