Skip to content

Commit

Permalink
Inline checkout and rustup installation steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchmindtree committed Feb 17, 2022
1 parent 5188c64 commit bac46af
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -60,33 +55,45 @@ 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:
image: ghcr.io/fuellabs/fuel-core:v0.3.1
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:
command: run
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:
Expand Down

0 comments on commit bac46af

Please sign in to comment.