diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 28cafe34..530fa0a4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,14 +1,41 @@ version: 2 updates: + # ---------- cargo ---------- - package-ecosystem: "cargo" directory: "/" + target-branch: "dev" schedule: interval: "weekly" ignore: - dependency-name: "*" + - package-ecosystem: "cargo" + directory: "/" + target-branch: "main" + schedule: + interval: "weekly" + ignore: + - dependency-name: "*" + + # ---------- console-ui ---------- + - package-ecosystem: "npm" + directory: "/console-ui" + target-branch: "dev" + schedule: + interval: "weekly" + groups: + console-ui-deps: + applies-to: version-updates + patterns: + - "*" + console-ui-security: + applies-to: security-updates + patterns: + - "*" + - package-ecosystem: "npm" directory: "/console-ui" + target-branch: "main" schedule: interval: "weekly" groups: @@ -21,8 +48,25 @@ updates: patterns: - "*" + # ---------- sdk/typescript ---------- + - package-ecosystem: "npm" + directory: "/sdk/typescript" + target-branch: "dev" + schedule: + interval: "weekly" + groups: + sdk-typescript-deps: + applies-to: version-updates + patterns: + - "*" + sdk-typescript-security: + applies-to: security-updates + patterns: + - "*" + - package-ecosystem: "npm" directory: "/sdk/typescript" + target-branch: "main" schedule: interval: "weekly" groups: @@ -35,8 +79,25 @@ updates: patterns: - "*" + # ---------- examples ---------- + - package-ecosystem: "npm" + directory: "/examples" + target-branch: "dev" + schedule: + interval: "weekly" + groups: + examples-deps: + applies-to: version-updates + patterns: + - "*" + examples-security: + applies-to: security-updates + patterns: + - "*" + - package-ecosystem: "npm" directory: "/examples" + target-branch: "main" schedule: interval: "weekly" groups: @@ -49,8 +110,25 @@ updates: patterns: - "*" + # ---------- github-actions ---------- + - package-ecosystem: "github-actions" + directory: "/" + target-branch: "dev" + schedule: + interval: "weekly" + groups: + github-actions-deps: + applies-to: version-updates + patterns: + - "*" + github-actions-security: + applies-to: security-updates + patterns: + - "*" + - package-ecosystem: "github-actions" directory: "/" + target-branch: "main" schedule: interval: "weekly" groups: @@ -61,4 +139,4 @@ updates: github-actions-security: applies-to: security-updates patterns: - - "*" \ No newline at end of file + - "*" diff --git a/.github/workflows/chainspec-sync-check.yml b/.github/workflows/chainspec-sync-check.yml index c9fce344..a5f2a734 100644 --- a/.github/workflows/chainspec-sync-check.yml +++ b/.github/workflows/chainspec-sync-check.yml @@ -2,9 +2,9 @@ name: Chainspec sync check on: push: - branches: [main] + branches: [main, dev] pull_request: - branches: [main] + branches: [main, dev] paths: - 'chainspecs/**' - '.github/workflows/chainspec-sync-check.yml' diff --git a/.github/workflows/check-console-ui.yml b/.github/workflows/check-console-ui.yml index 17ce229a..db456682 100644 --- a/.github/workflows/check-console-ui.yml +++ b/.github/workflows/check-console-ui.yml @@ -2,9 +2,9 @@ name: Check Console UI on: push: - branches: [main] + branches: [main, dev] pull_request: - branches: [ main ] + branches: [main, dev] jobs: build: diff --git a/.github/workflows/check-runtime-migration.yml b/.github/workflows/check-runtime-migration.yml index 13eefb9c..c8533204 100644 --- a/.github/workflows/check-runtime-migration.yml +++ b/.github/workflows/check-runtime-migration.yml @@ -5,9 +5,9 @@ name: Check Runtime Migrations on: push: - branches: [main, "release-*"] + branches: [main, dev, "release-*"] pull_request: - branches: [main, "release-*"] + branches: [main, dev, "release-*"] workflow_dispatch: schedule: - cron: '0 5 * * *' # Daily at 5 AM UTC diff --git a/.github/workflows/check-sdk.yml b/.github/workflows/check-sdk.yml index 8d5f5a82..317ae562 100644 --- a/.github/workflows/check-sdk.yml +++ b/.github/workflows/check-sdk.yml @@ -2,9 +2,9 @@ name: Check SDKs on: push: - branches: [main] + branches: [main, dev] pull_request: - branches: [main] + branches: [main, dev] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -39,8 +39,8 @@ jobs: - name: Rust cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: - shared-key: "bulletin-cache-sdk-rust" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-sdk-rust-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Clippy run: cargo clippy -p bulletin-sdk-rust --all-targets --locked --quiet -- -D warnings diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index cfb6b3c5..95df0402 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [main] + branches: [main, dev] pull_request: - branches: [main] + branches: [main, dev] workflow_dispatch: concurrency: @@ -100,8 +100,8 @@ jobs: - name: Rust cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: - shared-key: "bulletin-cache-clippy" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-clippy-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Cargo clippy run: | @@ -136,8 +136,8 @@ jobs: - name: Rust cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: - shared-key: "bulletin-cache-tests-${{ matrix.target.name }}" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-tests-${{ matrix.target.name }}-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Run tests run: ${{ matrix.target.cmd }} @@ -180,8 +180,8 @@ jobs: - name: Rust cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: - shared-key: "bulletin-cache-benchmarks-${{ matrix.runtime.name }}" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-benchmarks-${{ matrix.runtime.name }}-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Set up Polkadot binaries uses: ./.github/actions/use-polkadot-binaries diff --git a/.github/workflows/cmd-run.yml b/.github/workflows/cmd-run.yml index 9fc7faad..dfde77a4 100644 --- a/.github/workflows/cmd-run.yml +++ b/.github/workflows/cmd-run.yml @@ -12,6 +12,10 @@ on: pr_branch: description: "PR branch" required: true + base_branch: + description: "PR base branch" + required: false + default: "dev" runner: description: "Runner to use" required: true @@ -150,6 +154,7 @@ jobs: env: CMD: ${{ github.event.inputs.cmd }} PR_BRANCH: ${{ github.event.inputs.pr_branch }} + BASE_BRANCH: ${{ github.event.inputs.base_branch }} PR_NUM: ${{ github.event.inputs.pr_num }} REPO: ${{ github.event.inputs.repo }} runs-on: ${{ github.event.inputs.runner }} @@ -265,7 +270,7 @@ jobs: --no-color \ --change added changed \ --ignore-errors \ - refs/remotes/origin/main $PR_BRANCH) + "refs/remotes/origin/${BASE_BRANCH}" $PR_BRANCH) echo $result diff --git a/.github/workflows/cmd.yml b/.github/workflows/cmd.yml index 8d05426e..c52bbb2d 100644 --- a/.github/workflows/cmd.yml +++ b/.github/workflows/cmd.yml @@ -115,6 +115,7 @@ jobs: outputs: CMD: ${{ steps.get-comment.outputs.group2 }} pr-branch: ${{ steps.get-pr.outputs.pr_branch }} + base-branch: ${{ steps.get-pr.outputs.base_branch }} repo: ${{ steps.get-pr.outputs.repo }} steps: - name: Get command @@ -147,9 +148,11 @@ jobs: pull_number: context.issue.number, }); const prBranch = pr.data.head.ref; + const baseBranch = pr.data.base.ref; const repo = pr.data.head.repo.full_name; - console.log(prBranch, repo) + console.log(prBranch, baseBranch, repo) core.setOutput('pr_branch', prBranch); + core.setOutput('base_branch', baseBranch); core.setOutput('repo', repo); - name: Use PR Branch Name and Repo @@ -312,6 +315,7 @@ jobs: env: CMD: ${{ needs.get-pr-info.outputs.CMD }} PR_BRANCH: ${{ needs.get-pr-info.outputs.pr-branch }} + BASE_BRANCH: ${{ needs.get-pr-info.outputs.base-branch }} RUNNER: ${{ needs.set-runner.outputs.RUNNER }} IMAGE: ${{ needs.set-runner.outputs.IMAGE }} REPO: ${{ needs.get-pr-info.outputs.repo }} @@ -332,6 +336,7 @@ jobs: -f cmd="${CMD}" \ -f repo="${REPO}" \ -f pr_branch="${PR_BRANCH}" \ + -f base_branch="${BASE_BRANCH}" \ -f pr_num="${PR_NUMBER}" \ -f runner="${RUNNER}" \ -f is_org_member="${IS_ORG_MEMBER}" \ diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 313f2110..948063d4 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -2,9 +2,9 @@ name: Integration Tests on: push: - branches: [main] + branches: [main, dev] pull_request: - branches: [main] + branches: [main, dev] workflow_dispatch: concurrency: @@ -91,8 +91,8 @@ jobs: uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: workspaces: . - shared-key: "bulletin-cache-bulletin-integration-tests" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-bulletin-integration-tests-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Setup Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 diff --git a/.github/workflows/publish-crates.yml b/.github/workflows/publish-crates.yml index c54365c1..4cd3400f 100644 --- a/.github/workflows/publish-crates.yml +++ b/.github/workflows/publish-crates.yml @@ -80,7 +80,7 @@ jobs: echo "Invalid branch name: $RELEASE_BRANCH" >&2; exit 1; } case "$RELEASE_BRANCH" in - main|master|HEAD|-*|*..*|*" "*) + main|master|dev|HEAD|-*|*..*|*" "*) echo "Disallowed branch name: $RELEASE_BRANCH" >&2; exit 1 ;; esac diff --git a/.github/workflows/stress-test.yml b/.github/workflows/stress-test.yml index 6b58556b..8c36e4de 100644 --- a/.github/workflows/stress-test.yml +++ b/.github/workflows/stress-test.yml @@ -91,8 +91,8 @@ jobs: uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: workspaces: . - shared-key: "bulletin-cache-stress-test" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-stress-test-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Build stress test binary run: cargo build --release -p bulletin-stress-test diff --git a/.github/workflows/zombienet-tests.yml b/.github/workflows/zombienet-tests.yml index 0680c8b6..d0f3a848 100644 --- a/.github/workflows/zombienet-tests.yml +++ b/.github/workflows/zombienet-tests.yml @@ -2,11 +2,11 @@ name: Zombienet SDK Tests on: workflow_dispatch: - # Populate the binaries cache under main's scope so PRs can read it. + # Populate the binaries cache under the dev scope so PRs can read it. push: - branches: [main] + branches: [main, dev] pull_request: - branches: [main] + branches: [main, dev] # `labeled` lets the sync suite kick in when its label is added mid-PR. types: [opened, synchronize, reopened, labeled] @@ -96,8 +96,8 @@ jobs: uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: workspaces: . - shared-key: "bulletin-cache-zombienet-auto-renew-tests-${{ matrix.runtime.name }}" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-zombienet-auto-renew-tests-${{ matrix.runtime.name }}-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Restore bulletin chain specs cache uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 @@ -154,8 +154,8 @@ jobs: uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: workspaces: . - shared-key: "bulletin-cache-zombienet-sync-tests-${{ matrix.runtime.name }}" - save-if: ${{ github.ref == 'refs/heads/main' }} + shared-key: "bulletin-cache-zombienet-sync-tests-${{ matrix.runtime.name }}-${{ github.base_ref || github.ref_name }}" + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }} - name: Restore bulletin chain specs cache uses: actions/cache/restore@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5