Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
revert: #467,#472,#473 (#474)
Browse files Browse the repository at this point in the history
Co-authored-by: Rashad Alston <[email protected]>
  • Loading branch information
ra0x3 and Rashad Alston authored Jan 12, 2023
1 parent 948645e commit c2425c8
Showing 1 changed file with 93 additions and 55 deletions.
148 changes: 93 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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'

Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c2425c8

Please sign in to comment.