From c2425c8b63f01ef1b540ff3e5832ebdc018b951d Mon Sep 17 00:00:00 2001 From: rashad Date: Thu, 12 Jan 2023 09:24:33 -0500 Subject: [PATCH] revert: #467,#472,#473 (#474) Co-authored-by: Rashad Alston --- .github/workflows/ci.yml | 148 ++++++++++++++++++++++++--------------- 1 file changed, 93 insertions(+), 55 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aafbdc14f..7c7a7e383 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,12 +30,16 @@ jobs: - cancel-previous-runs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Install toolchain - run: rustup default stable + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable - uses: Swatinem/rust-cache@v1 - name: Install Cargo.toml linter - run: cargo install --version 0.1.1 cargo-toml-lint + uses: baptiste0928/cargo-install@v1 + with: + crate: cargo-toml-lint + version: '0.1' - name: Run Cargo.toml linter run: git ls-files | grep Cargo.toml$ | xargs --verbose -n 1 cargo-toml-lint @@ -62,11 +66,11 @@ jobs: - cancel-previous-runs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set minimal profile - run: rustup set profile minimal - - name: Install toolchain - run: rustup default stable + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable - uses: Swatinem/rust-cache@v1 - name: mdbook build uses: peaceiris/actions-mdbook@v1 @@ -103,16 +107,25 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v3 - - name: Install toolchain - run: rustup default nightly + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + # `cargo-udeps` requires nightly to run + toolchain: nightly + default: true - uses: Swatinem/rust-cache@v1 - run: cargo install sqlx-cli - run: bash scripts/run_migrations.bash - name: Install cargo-udeps - run: cargo install cargo-udeps + uses: actions-rs/cargo@v1 + with: + command: install + args: cargo-udeps - name: Check Unused Deps - run: cargo udeps --locked --all-targets --all-features + uses: actions-rs/cargo@v1 + with: + command: udeps + args: --locked --all-targets --all-features cargo-build-wasm-example: needs: @@ -130,15 +143,18 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v3 - - name: Set minimal profile - run: rustup set profile minimal - - name: Install toolchain - run: rustup default stable - - name: Install WASM target - run: rustup target add wasm32-unknown-unknown - - name: Build WASM example - run: cargo build -p fuel-indexer-test --release --target wasm32-unknown-unknown + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: wasm32-unknown-unknown + - uses: Swatinem/rust-cache@v1 + - uses: actions-rs/cargo@v1 + name: Cargo Build WASM Example + with: + command: build + args: -p fuel-indexer-test --release --target wasm32-unknown-unknown cargo-verifications: runs-on: ubuntu-latest @@ -161,28 +177,39 @@ jobs: matrix: package: ${{ fromJSON(needs.get-workspace-members.outputs.members) }} include: - - command: fmt --all --verbose -- --check - - command: clippy --all-features --all-targets - - command: check --all-features --locked --workspace --all-targets - - command: build --locked --workspace --all-features --all-targets - - command: test --locked --workspace - - command: test --locked --all-targets --no-default-features --workspace - - command: test --locked --all-targets --features postgres --workspace - - command: test --locked --all-targets --features sqlite --workspace + - command: fmt + args: --all --verbose -- --check + - command: clippy + args: --all-features --all-targets + - command: check + args: --all-features --locked --workspace --all-targets + - command: build + args: --locked --workspace --all-features --all-targets + - command: test + args: --locked --workspace + - command: test + args: --locked --all-targets --no-default-features --workspace + - command: test + args: --locked --all-targets --features postgres --workspace + - command: test + args: --locked --all-targets --features sqlite --workspace # disallow any job that takes longer than 45 minutes timeout-minutes: 45 continue-on-error: ${{ matrix.skip-error || false }} steps: - - uses: actions/checkout@v3 - - name: Set minimal profile - run: rustup set profile minimal - - name: Install toolchain - run: rustup default stable + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable - run: cargo install sqlx-cli - run: bash scripts/run_migrations.bash - - name: ${{ matrix.command }} - run: cargo ${{ matrix.command }} + - name: ${{ matrix.command }} ${{ matrix.args }} + uses: actions-rs/cargo@v1 + with: + command: ${{ matrix.command }} + args: ${{ matrix.args }} - name: Notify if Job Fails uses: ravsamhq/notify-slack-action@v1 if: always() && github.ref == 'refs/heads/master' @@ -216,19 +243,21 @@ jobs: - 5432:5432 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v3 - - name: Set minimal profile - run: rustup set profile minimal - - name: Install toolchain - run: rustup default stable - - name: Install WASM target - run: rustup target add wasm32-unknown-unknown + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v1 - run: cargo install sqlx-cli - run: bash scripts/run_migrations.bash - name: Build fuel-node - run: cargo build -p fuel-node --locked + uses: actions-rs/cargo@v1 + with: + command: build + args: -p fuel-node --locked env: RUSTFLAGS: '-D warnings' @@ -238,6 +267,7 @@ jobs: --wallet-path packages/fuel-indexer-tests/assets/test-chain-config.json \ --contract-bin-path packages/fuel-indexer-tests/contracts/fuel-indexer-test/out/debug/fuel-indexer-test.bin & + - uses: actions-rs/cargo@v1 - name: Cargo e2e tests run: bash packages/fuel-indexer-tests/scripts/e2e.bash - name: Stop testing components @@ -357,11 +387,14 @@ jobs: run: | ci/macos-install-packages.sh - - name: Set minimal profile - run: rustup set profile minimal - name: Install toolchain - run: rustup override set stable-${{ matrix.job.target }} - + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: ${{ matrix.job.target }} + override: true + - name: Install cross uses: baptiste0928/cargo-install@v1 with: @@ -518,10 +551,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v2 - name: Install toolchain - run: rustup override set stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true - name: Verify tag version run: | curl -sSLf "https://github.com/TomWright/dasel/releases/download/v1.24.3/dasel_linux_amd64" -L -o dasel && chmod +x dasel @@ -539,10 +575,12 @@ jobs: ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} packages/fuel-indexer-types/Cargo.toml ./.github/workflows/scripts/verify_tag.sh ${{ github.ref_name }} packages/fuel-indexer/Cargo.toml - - name: Install toolchain - run: rustup default stable - name: Install WASM target - run: rustup target add wasm32-unknown-unknown + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: wasm32-unknown-unknown - name: Publish crates uses: katyo/publish-crates@v1