Skip to content

Commit

Permalink
Add default test
Browse files Browse the repository at this point in the history
  • Loading branch information
placintaalexandru committed Oct 28, 2023
1 parent a006db2 commit 7029c57
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/test_install_as_default_toolchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI Test - install as default toolchain
on:
- pull_request
jobs:
install_on_runner:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
toolchain:
- 1.70.0
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Use myself
id: toolchain
uses: ./
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
default: true

- name: Test toolchain version
run: |
test "${{ steps.toolchain.outputs.rustc }}" = "${{ matrix.toolchain }}" || (echo "Expected: ${{ matrix.toolchain }}; Got: ${{ steps.toolchain.outputs.rustc }}" && exit 1)
install_in_docker:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- 1.70.0
# Docker image, not the GitHub Actions VM
container: ubuntu:latest
steps:
- name: Checkout
uses: actions/checkout@v4

# `rustup` will need `curl` or `wget` later
- name: Install packages
run: apt-get update && apt-get install -y curl

- name: Use myself
id: toolchain
uses: ./
with:
toolchain: ${{ matrix.toolchain }}
profile: minimal
default: true

- name: Test toolchain version
run: |
test "${{ steps.toolchain.outputs.rustc }}" = "${{ matrix.toolchain }}" || (echo "Expected: ${{ matrix.toolchain }}; Got: ${{ steps.toolchain.outputs.rustc }}" && exit 1)

0 comments on commit 7029c57

Please sign in to comment.