diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ffca0fa6fd..ba4658a0337 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,26 @@ env: NIGHTLY_RUST_VERSION: nightly-2023-12-27 jobs: + get-fuel-core-version: + runs-on: ubuntu-latest + outputs: + fuel_core_version: ${{steps.get_fuel_core_ver.outputs.version}} + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Install toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ env.RUST_VERSION }} + + - name: get fuel core version + id: get_fuel_core_ver + run: | + cargo install toml-cli + version=$(toml get Cargo.toml workspace.dependencies.fuel-core-client.version | tr -d '"') + echo "version=$version" >> "$GITHUB_OUTPUT" + build-sway-lib-core: runs-on: ubuntu-latest steps: @@ -278,9 +298,10 @@ jobs: cargo-run-e2e-test: runs-on: ubuntu-latest + needs: get-fuel-core-version services: fuel-core: - image: ghcr.io/fuellabs/fuel-core:v0.22.0 + image: ghcr.io/fuellabs/fuel-core:v${{ needs.get-fuel-core-version.outputs.fuel_core_version }} ports: - 4000:4000 steps: @@ -420,6 +441,7 @@ jobs: cargo-test-workspace: runs-on: ubuntu-latest + needs: get-fuel-core-version steps: - uses: actions/checkout@v3 - name: Install toolchain @@ -430,7 +452,7 @@ jobs: uses: baptiste0928/cargo-install@v2 with: crate: fuel-core-bin - version: "0.22" + version: ${{ needs.get-fuel-core-version.outputs.fuel_core_version }} - uses: Swatinem/rust-cache@v2 - name: Run tests run: cargo test --locked --release