diff --git a/.github/workflows/r_linting.yml b/.github/workflows/_linting.yml similarity index 100% rename from .github/workflows/r_linting.yml rename to .github/workflows/_linting.yml diff --git a/.github/workflows/da-indexer.yml b/.github/workflows/da-indexer.yml index f301ddaf8..88f3e5a4e 100644 --- a/.github/workflows/da-indexer.yml +++ b/.github/workflows/da-indexer.yml @@ -8,14 +8,12 @@ on: - da-indexer/** - .github/workflows/da-indexer.yml - .github/workflows/_*.yml - - .github/workflows/r_*.yml - .github/actions/** pull_request: paths: - da-indexer/** - .github/workflows/da-indexer.yml - .github/workflows/_*.yml - - .github/workflows/r_*.yml - .github/actions/** name: Test, lint and docker (da-indexer) @@ -69,7 +67,7 @@ jobs: lint: name: Linting - uses: ./.github/workflows/r_linting.yml + uses: ./.github/workflows/_linting.yml with: working-directory: da-indexer diff --git a/.github/workflows/eth-bytecode-db.yml b/.github/workflows/eth-bytecode-db.yml index 60cfd9eff..9004d0daa 100644 --- a/.github/workflows/eth-bytecode-db.yml +++ b/.github/workflows/eth-bytecode-db.yml @@ -7,14 +7,14 @@ on: paths: - eth-bytecode-db/** - .github/workflows/eth-bytecode-db.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** pull_request: paths: - eth-bytecode-db/** - .github/workflows/eth-bytecode-db.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** name: Test, lint and docker (eth-bytecode-db) @@ -45,6 +45,11 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 + - name: Setup + uses: ./.github/actions/setup + with: + working-directory: eth-bytecode-db + - name: Set postgres max_connections run: | psql -h localhost -p 5432 -c "ALTER SYSTEM SET max_connections = 500;" -d postgres @@ -58,22 +63,6 @@ jobs: with: args: docker restart postgres - - 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: eth-bytecode-db -> target - - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture if: success() || failure() @@ -90,32 +79,9 @@ jobs: 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: eth-bytecode-db -> 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 + uses: ./.github/workflows/_linting.yml + with: + working-directory: eth-bytecode-db docker: name: Docker build and docker push diff --git a/.github/workflows/proxy-verifier.yml b/.github/workflows/proxy-verifier.yml index b1ffb2a97..e8705cca9 100644 --- a/.github/workflows/proxy-verifier.yml +++ b/.github/workflows/proxy-verifier.yml @@ -7,14 +7,14 @@ on: paths: - proxy-verifier/** - .github/workflows/proxy-verifier.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** pull_request: paths: - proxy-verifier/** - .github/workflows/proxy-verifier.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** name: Test, lint and docker (proxy-verifier) @@ -30,21 +30,10 @@ jobs: - 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 + - name: Setup + uses: ./.github/actions/setup with: - cache-on-failure: true - workspaces: proxy-verifier -> target + working-directory: proxy-verifier - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture @@ -60,32 +49,9 @@ jobs: 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: proxy-verifier -> 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 + uses: ./.github/workflows/_linting.yml + with: + working-directory: proxy-verifier docker: name: Docker build and docker push diff --git a/.github/workflows/sig-provider.yml b/.github/workflows/sig-provider.yml index ffa498e1a..0fe3cdeeb 100644 --- a/.github/workflows/sig-provider.yml +++ b/.github/workflows/sig-provider.yml @@ -7,14 +7,14 @@ on: paths: - sig-provider/** - .github/workflows/sig-provider.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** pull_request: paths: - sig-provider/** - .github/workflows/sig-provider.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** name: Test, lint and docker (sig-provider) @@ -30,21 +30,10 @@ jobs: - 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 + - name: Setup + uses: ./.github/actions/setup with: - cache-on-failure: true - workspaces: sig-provider -> target + working-directory: sig-provider - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture @@ -60,32 +49,9 @@ jobs: 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: sig-provider -> 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 + uses: ./.github/workflows/_linting.yml + with: + working-directory: sig-provider docker: name: Docker build and docker push diff --git a/.github/workflows/smart-contract-verifier.yml b/.github/workflows/smart-contract-verifier.yml index 6e10bd38a..dcd86e63b 100644 --- a/.github/workflows/smart-contract-verifier.yml +++ b/.github/workflows/smart-contract-verifier.yml @@ -7,14 +7,14 @@ on: paths: - smart-contract-verifier/** - .github/workflows/smart-contract-verifier.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** pull_request: paths: - smart-contract-verifier/** - .github/workflows/smart-contract-verifier.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** name: Test, lint and docker (smart-contract-verifier) @@ -30,21 +30,10 @@ jobs: - 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 + - name: Setup + uses: ./.github/actions/setup with: - cache-on-failure: true - workspaces: smart-contract-verifier -> target + working-directory: smart-contract-verifier - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture @@ -60,32 +49,9 @@ jobs: 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: smart-contract-verifier -> 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 + uses: ./.github/workflows/_linting.yml + with: + working-directory: smart-contract-verifier docker: name: Docker build and docker push diff --git a/.github/workflows/smart-guessr.yml b/.github/workflows/smart-guessr.yml index c7019473d..d886e96ec 100644 --- a/.github/workflows/smart-guessr.yml +++ b/.github/workflows/smart-guessr.yml @@ -7,12 +7,12 @@ on: paths: - smart-guessr/** - .github/workflows/smart-guessr.yml - - .github/workflows/_*.yml + - .github/workflows/_docker-build-push.yml pull_request: paths: - smart-guessr/** - .github/workflows/smart-guessr.yml - - .github/workflows/_*.yml + - .github/workflows/_docker-build-push.yml name: Test and docker (smart-guessr) diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index c8719b508..22d398486 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml @@ -7,14 +7,14 @@ on: paths: - stats/** - .github/workflows/stats.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** pull_request: paths: - stats/** - .github/workflows/stats.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** name: Test, lint and docker (stats) @@ -43,21 +43,10 @@ jobs: - 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 + - name: Setup + uses: ./.github/actions/setup with: - cache-on-failure: true - workspaces: stats -> target + working-directory: stats - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture @@ -79,35 +68,9 @@ jobs: 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: stats -> 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 - - - name: cargo doc - run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --document-private-items + uses: ./.github/workflows/_linting.yml + with: + working-directory: stats docker: name: Docker build and docker push diff --git a/.github/workflows/user-ops-indexer.yml b/.github/workflows/user-ops-indexer.yml index 94d6bc631..593f28af3 100644 --- a/.github/workflows/user-ops-indexer.yml +++ b/.github/workflows/user-ops-indexer.yml @@ -7,14 +7,14 @@ on: paths: - user-ops-indexer/** - .github/workflows/user-ops-indexer.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** pull_request: paths: - user-ops-indexer/** - .github/workflows/user-ops-indexer.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** name: Test, lint and docker (user-ops-indexer) @@ -43,21 +43,10 @@ jobs: - 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 + - name: Setup + uses: ./.github/actions/setup with: - cache-on-failure: true - workspaces: user-ops-indexer -> target + working-directory: user-ops-indexer - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture @@ -76,32 +65,9 @@ jobs: 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: user-ops-indexer -> 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 + uses: ./.github/workflows/_linting.yml + with: + working-directory: user-ops-indexer docker: name: Docker build and docker push diff --git a/.github/workflows/visualizer.yml b/.github/workflows/visualizer.yml index 9e80c0eb0..6aa439166 100644 --- a/.github/workflows/visualizer.yml +++ b/.github/workflows/visualizer.yml @@ -7,14 +7,14 @@ on: paths: - visualizer/** - .github/workflows/visualizer.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** pull_request: paths: - visualizer/** - .github/workflows/visualizer.yml - - .github/actions/deps/** - .github/workflows/_*.yml + - .github/actions/** name: Test, lint and docker (visualizer) @@ -30,8 +30,10 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - - name: Install deps - uses: ./.github/actions/deps + - name: Setup + uses: ./.github/actions/setup + with: + working-directory: visualizer - uses: actions/setup-node@v3 with: @@ -42,19 +44,6 @@ jobs: npm install phantom npm link sol2uml@2.1 --only=production - - 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: visualizer -> target - - name: Unit tests run: RUST_BACKTRACE=1 RUST_LOG=info cargo test --locked --workspace --all-features --lib --bins -- --nocapture if: success() || failure() @@ -69,32 +58,9 @@ jobs: 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: visualizer -> 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 + uses: ./.github/workflows/_linting.yml + with: + working-directory: visualizer docker: name: Docker build and docker push