[go: nahoru, domu]

Skip to content

Commit

Permalink
Update actions to install the latest rust
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Thomas <taylor@oftaylor.com>
  • Loading branch information
thomastaylor312 committed Oct 21, 2021
1 parent e588198 commit f587034
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 16 deletions.
31 changes: 24 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,17 @@ jobs:
}
steps:
- uses: actions/checkout@v2
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: clippy, rustfmt
- uses: engineerd/configurator@v0.0.7
with:
name: ${{ matrix.config.name }}
url: ${{ matrix.config.url }}
pathInArchive: ${{ matrix.config.pathInArchive }}
# hack(bacongobbler): install rustfmt to work around darwin toolchain issues
- name: "(macOS) install dev tools"
if: runner.os == 'macOS'
run: |
rustup component add rustfmt --toolchain stable-x86_64-apple-darwin
rustup component add clippy --toolchain stable-x86_64-apple-darwin
rustup update stable
- name: setup for cross-compile builds
if: matrix.config.arch == 'aarch64'
run: |
Expand Down Expand Up @@ -80,6 +79,12 @@ jobs:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: clippy, rustfmt
- uses: engineerd/configurator@v0.0.5
with:
name: just
Expand All @@ -97,6 +102,12 @@ jobs:
runs-on: [self-hosted, windows, x64]
steps:
- uses: actions/checkout@v2
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: clippy, rustfmt
- uses: engineerd/configurator@v0.0.7
with:
name: just.exe
Expand Down Expand Up @@ -141,6 +152,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: clippy, rustfmt
- uses: engineerd/setup-kind@v0.5.0
with:
version: "v0.11.1"
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@ jobs:
OS=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')
echo "RUNNER_OS=${OS}" >> $GITHUB_ENV
# hack(bacongobbler): install rustfmt to work around darwin toolchain issues
- name: "(macOS) install dev tools"
if: runner.os == 'macOS'
run: |
rustup component add rustfmt --toolchain stable-x86_64-apple-darwin
rustup component add clippy --toolchain stable-x86_64-apple-darwin
rustup update stable
- name: Install latest Rust stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: clippy, rustfmt

- name: setup for cross-compile builds
if: matrix.config.arch == 'aarch64'
Expand Down
12 changes: 10 additions & 2 deletions tests/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ pub async fn pod_exited_successfully(pods: &Api<Pod>, pod_name: &str) -> anyhow:
pub async fn pod_exited_with_failure(pods: &Api<Pod>, pod_name: &str) -> anyhow::Result<()> {
let pod = pods.get(pod_name).await?;

let phase = (|| { let _ = &pod; pod.status?.phase })().expect("Could not get pod phase");
let phase = (|| {
let _ = &pod;
pod.status?.phase
})()
.expect("Could not get pod phase");
assert_eq!(phase, "Failed");

Ok(())
Expand All @@ -87,7 +91,11 @@ pub async fn pod_reason_contains(
) -> anyhow::Result<()> {
let pod = pods.get(pod_name).await?;

let message = (|| { let _ = &pod; pod.status?.reason })().expect("Could not get pod message.");
let message = (|| {
let _ = &pod;
pod.status?.reason
})()
.expect("Could not get pod message.");
assert!(
message.contains(expected_message),
"Expected pod message containing {} but got {}",
Expand Down

0 comments on commit f587034

Please sign in to comment.