From bac46af91f67ffb602d1bc9ecf46caed8eff969b Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Thu, 17 Feb 2022 18:51:13 +1100 Subject: [PATCH] Inline checkout and rustup installation steps --- .github/workflows/ci.yml | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da0cf89b501..a9f6988fac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,23 +21,14 @@ jobs: with: access_token: ${{ github.token }} - install-rust-and-checkout: - needs: cancel-previous-runs + rustfmt-check: runs-on: ubuntu-latest steps: - - name: Install Rust Toolchain - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable override: true - - name: Checkout repository - uses: actions/checkout@v2 - - rustfmt-check: - needs: install-rust-and-checkout - runs-on: ubuntu-latest - steps: - name: Install rustfmt run: rustup component add rustfmt - name: Check Formatting @@ -47,9 +38,13 @@ jobs: args: --all -- --check cargo-build-workspace: - needs: install-rust-and-checkout runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: true - name: Cargo Build Workspace uses: Swatinem/rust-cache@v1 - uses: actions-rs/cargo@v1 @@ -60,16 +55,19 @@ jobs: RUSTFLAGS: "-D warnings" cargo-test-workspace: - needs: install-rust-and-checkout runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: true - name: Run tests uses: actions-rs/cargo@v1 with: command: test cargo-run-e2e-test: - needs: install-rust-and-checkout runs-on: ubuntu-latest services: fuel-core: @@ -77,6 +75,11 @@ jobs: ports: - 4000:4000 steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: true - name: Cargo Run E2E Tests uses: actions-rs/cargo@v1 with: @@ -84,9 +87,13 @@ jobs: args: --release --bin test build-sway-examples: - needs: install-rust-and-checkout runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + override: true - name: Install Forc uses: actions-rs/cargo@v1 with: