diff --git a/.github/workflows/scoutcloud.yml b/.github/workflows/scoutcloud.yml deleted file mode 100644 index 0fd930961..000000000 --- a/.github/workflows/scoutcloud.yml +++ /dev/null @@ -1,182 +0,0 @@ -on: - push: - branches: - - 'main' - tags: - - 'scoutcloud/v*' - paths: - - scoutcloud/** - - .github/workflows/scoutcloud.yml - - .github/actions/deps/** - - .github/workflows/docker-build-push.yml - pull_request: - paths: - - scoutcloud/** - - .github/workflows/scoutcloud.yml - - .github/actions/deps/** - - .github/workflows/docker-build-push.yml - -name: Test, lint and docker (scoutcloud) - -defaults: - run: - working-directory: scoutcloud - -jobs: - test: - name: Unit, doc and integration tests - runs-on: ubuntu-latest - services: - postgres: - image: postgres - env: - POSTGRES_PASSWORD: admin - POSTGRES_USER: postgres - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - ports: - - 5432:5432 - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Install deps - uses: ./.github/actions/deps - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - - - name: Rust cache - uses: Swatinem/rust-cache@v2 - with: - cache-on-failure: true - workspaces: scoutcloud -> target - - - name: ENVs in doc tests - run: cargo run --bin check-envs - env: - VALIDATE_ONLY: true - - - name: Unit tests - run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture - if: success() || failure() - env: - DATABASE_URL: postgres://postgres:admin@localhost:5432/ - - - name: Doc tests - run: cargo test --locked --workspace --all-features --doc - if: success() || failure() - - - name: Integration tests - run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --test '*' -- --nocapture --include-ignored - if: success() || failure() - env: - DATABASE_URL: postgres://postgres:admin@localhost:5432/ - - lint: - name: Linting - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Install deps - uses: ./.github/actions/deps - - - name: Install toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - components: rustfmt, clippy - override: true - - - uses: Swatinem/rust-cache@v2 - with: - cache-on-failure: true - workspaces: scoutcloud -> target - - - name: cargo fmt - run: cargo fmt --all -- --check --config imports_granularity=Crate - - - name: cargo clippy - run: cargo clippy --all --all-targets --all-features -- -D warnings - - docker: - name: Docker build and docker push - needs: - - test - - lint - if: | - always() && - (needs.test.result == 'success' || needs.test.result == 'cancelled') && - (needs.lint.result == 'success' || needs.lint.result == 'cancelled') - uses: ./.github/workflows/docker-build-push.yml - with: - service-name: scoutcloud - - deploy_prod: - name: Deploy prod instance - needs: docker - if: ${{ github.ref == 'refs/heads/main' }} - runs-on: ubuntu-latest - permissions: write-all - steps: - - name: Get Vault credentials - id: retrieve-vault-secrets - uses: hashicorp/vault-action@v2.4.1 - with: - url: https://vault.k8s.blockscout.com - role: ci-dev - path: github-jwt - method: jwt - tlsSkipVerify: false - exportToken: true - secrets: | - ci/data/dev/github token | WORKFLOW_TRIGGER_TOKEN ; - - name: Trigger deploy - uses: convictional/trigger-workflow-and-wait@v1.6.1 - with: - owner: blockscout - repo: deployment-values - github_token: ${{ env.WORKFLOW_TRIGGER_TOKEN }} - workflow_file_name: deploy_services.yaml - ref: main - wait_interval: 30 - client_payload: '{ "instance": "scoutcloud", "globalEnv": "production"}' - e2e_test: - name: Test scoutcloud - needs: deploy_prod - if: ${{ github.ref == 'refs/heads/main' }} - runs-on: ubuntu-latest - permissions: write-all - steps: - - name: Get Vault credentials - id: retrieve-vault-secrets - uses: hashicorp/vault-action@v2.4.1 - with: - url: https://vault.k8s.blockscout.com - role: ci-dev - path: github-jwt - method: jwt - tlsSkipVerify: false - exportToken: true - secrets: | - ci/data/dev/github token | WORKFLOW_TRIGGER_TOKEN ; - - name: Trigger Tests - uses: convictional/trigger-workflow-and-wait@v1.6.1 - with: - owner: blockscout - repo: blockscout-ci-cd - github_token: ${{ env.WORKFLOW_TRIGGER_TOKEN }} - workflow_file_name: e2e_scoutcloud.yaml - ref: master - wait_interval: 30 - client_payload: '{ "server_size": "small", "rpc_url": "https://sepolia.drpc.org", "chain_type": "ethereum", "node_type": "geth"}'