diff --git a/.github/.DS_Store b/.github/.DS_Store index b0c90a58..daf430c9 100644 Binary files a/.github/.DS_Store and b/.github/.DS_Store differ diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml deleted file mode 100644 index 80409773..00000000 --- a/.github/workflows/coverage.yml +++ /dev/null @@ -1,112 +0,0 @@ ---- -name: Task - Rust Tests & Coverage - -on: - workflow_dispatch: - workflow_call: - -jobs: - coverage: - # sadly, for now we have to "rebuild" for the coverage - runs-on: self-hosted - - env: - HOST: 0.0.0.0 - PORT: 8080 - DATABASE_URL: postgres://postgres:postgres@localhost:5432 - AWS_REGION: eu-west-3 - LOCALSTACK_ENDPOINT: http://localhost:4566 - BINARY_BASE_PATH: /bin - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - APIBARA_AUTH_TOKEN: ${{ secrets.APIBARA_AUTH_TOKEN }} - APIBARA_ETCD_URL: http://localhost:2379 - - services: - postgres: - image: postgres:latest - env: - POSTGRES_DB: postgres - POSTGRES_USER: postgres - POSTGRES_HOST_AUTH_METHOD: trust - ports: - - 5432:5432 - # Set health checks to wait until postgres has started - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - localstack: - image: localstack/localstack:latest - ports: - - 4566:4566 - - 4571:4571 - - 8080:8080 - options: >- - --health-cmd "curl -k https://localhost:4566" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - - etcd: - image: bitnami/etcd:3.5.0 - ports: - - 2379:2379 - - 2380:2380 - env: - ALLOW_NONE_AUTHENTICATION: yes - - steps: - - uses: actions/checkout@v3 - - # selecting a toolchain either by action or manual `rustup` calls should happen - # before the plugin, as the cache uses the current rustc version as its cache key - - run: rustup show - - - uses: taiki-e/install-action@cargo-llvm-cov - - uses: taiki-e/install-action@nextest - - - name: Download sink binaries - run: | - wget https://github.com/apibara/dna/releases/download/sink-webhook/v0.3.3/sink-webhook-x86_64-linux.gz - gunzip sink-webhook-x86_64-linux.gz - sudo cp sink-webhook-x86_64-linux /bin/sink-webhook - sudo chmod 777 /bin/sink-webhook - - wget https://github.com/apibara/dna/releases/download/sink-postgres/v0.4.3/sink-postgres-x86_64-linux.gz - gunzip sink-postgres-x86_64-linux.gz - sudo cp sink-postgres-x86_64-linux /bin/sink-postgres - sudo chmod 777 /bin/sink-postgres - - - name: Start LocalStack - run: | - pip install awscli-local - - - name: Create S3 Bucket and SQS Queues - run: | - awslocal s3api create-bucket --bucket indexer-service --region eu-west-3 --create-bucket-configuration LocationConstraint=eu-west-3 - awslocal s3api put-object --bucket indexer-service --key apibara-scripts/ - awslocal s3api list-buckets - awslocal sqs create-queue --queue-name indexer-service-start-indexer - awslocal sqs create-queue --queue-name indexer-service-failed-indexer - awslocal sqs create-queue --queue-name indexer-service-stop-indexer - awslocal sqs list-queues - - - name: Clean workspace - run: | - cargo llvm-cov clean --workspace - - - name: Run llvm-cov - run: | - cargo llvm-cov nextest --release --test-threads=1 --lcov --output-path lcov.info - - - name: Upload coverage to codecov.io - uses: codecov/codecov-action@v3 - with: - files: lcov.info - fail_ci_if_error: false - - - uses: colpal/actions-clean@v1 - if: ${{ always() }} # To ensure this step runs even when earlier steps fail diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 588c3afb..93081bcb 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -21,8 +21,3 @@ jobs: name: Run Cargo linters uses: ./.github/workflows/linters-cargo.yml needs: rust_build - - coverage: - name: Run coverage - uses: ./.github/workflows/coverage.yml - needs: rust_build diff --git a/src/.DS_Store b/src/.DS_Store index 6ac5d219..f65d017c 100644 Binary files a/src/.DS_Store and b/src/.DS_Store differ diff --git a/src/da_clients/ethereum/config.rs b/src/da_clients/ethereum/config.rs index bf61cf0b..29da4f35 100644 --- a/src/da_clients/ethereum/config.rs +++ b/src/da_clients/ethereum/config.rs @@ -1,11 +1,6 @@ use crate::da_clients::DaConfig; use crate::utils::env_utils::get_env_var_or_panic; - - - - - #[derive(Clone, Debug)] pub struct EthereumDaConfig { pub rpc_url: String,