diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml deleted file mode 100644 index b009aed..0000000 --- a/.github/workflows/ci-build.yml +++ /dev/null @@ -1,27 +0,0 @@ -# Proxy workflow for CI_Toolkit — copy to .github/workflows/ci-build.yml in your -# org's proxy repo (e.g. BHoM/CI_Proxy). -# -# Required by rulesets: alpha, beta -# -# The org ruleset for each applicable maturity tier should require: -# /.github/workflows/ci-build.yml@main -# -# Note: paths filters are ignored by GitHub org rulesets — the workflow always runs on -# every pull_request. Early exits within the reusable workflow handle no-op cases. - -name: Build - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - build: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-build.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} - diff --git a/.github/workflows/ci-code-compliance.yml b/.github/workflows/ci-code-compliance.yml deleted file mode 100644 index 85e9d0c..0000000 --- a/.github/workflows/ci-code-compliance.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Code Compliance - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - code-compliance: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-code-compliance.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} diff --git a/.github/workflows/ci-copyright-compliance.yml b/.github/workflows/ci-copyright-compliance.yml deleted file mode 100644 index e539873..0000000 --- a/.github/workflows/ci-copyright-compliance.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Copyright Compliance - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - copyright-compliance: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-copyright-compliance.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} diff --git a/.github/workflows/ci-dataset-compliance.yml b/.github/workflows/ci-dataset-compliance.yml deleted file mode 100644 index a3617c9..0000000 --- a/.github/workflows/ci-dataset-compliance.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Dataset Compliance - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - dataset-compliance: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-dataset-compliance.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} diff --git a/.github/workflows/ci-dataset-tests.yml b/.github/workflows/ci-dataset-tests.yml deleted file mode 100644 index 7481449..0000000 --- a/.github/workflows/ci-dataset-tests.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Dataset Unit Tests - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - dataset-tests: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-dataset-tests.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} diff --git a/.github/workflows/ci-documentation-compliance.yml b/.github/workflows/ci-documentation-compliance.yml deleted file mode 100644 index 638dceb..0000000 --- a/.github/workflows/ci-documentation-compliance.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Documentation Compliance - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - documentation-compliance: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-documentation-compliance.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml index 0863ad6..2f2cd48 100644 --- a/.github/workflows/ci-format.yml +++ b/.github/workflows/ci-format.yml @@ -1,15 +1,12 @@ -# Proxy workflow for CI_Toolkit — copy to .github/workflows/ci-format.yml in your -# org's proxy repo (e.g. BHoM/CI_Proxy). +# Proxy workflow. Copy to .github/workflows/ci-format.yml in your org's proxy +# repo and require /.github/workflows/ci-format.yml@develop in the +# org ruleset for the prototype, alpha, beta maturity tier(s). # -# Required by rulesets: prototype, alpha, beta -# -# The org ruleset for each applicable maturity tier should require: -# /.github/workflows/ci-format.yml@main -# -# Note: paths filters are ignored by GitHub org rulesets — the workflow always runs on -# every pull_request. Early exits within the reusable workflow handle no-op cases. +# Rulesets ignore event filters on required workflows, so this file has +# no paths filter. The composite self-skips when no relevant files have changed. +# Workflow name CI keeps check contexts bare: required contexts are the job names. -name: Format +name: CI on: pull_request: @@ -20,5 +17,11 @@ concurrency: jobs: format: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-format.yml@develop - secrets: inherit + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Run format + uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/actions/ci-format@develop + with: + app_id: ${{ secrets.BHOM_APP_ID }} + private_key: ${{ secrets.BHOM_APP_PRIVATE_KEY }} diff --git a/.github/workflows/ci-project-compliance.yml b/.github/workflows/ci-project-compliance.yml deleted file mode 100644 index db96e53..0000000 --- a/.github/workflows/ci-project-compliance.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Project Compliance - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - project-compliance: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-project-compliance.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} diff --git a/.github/workflows/ci-serialisation.yml b/.github/workflows/ci-serialisation.yml deleted file mode 100644 index 40adb44..0000000 --- a/.github/workflows/ci-serialisation.yml +++ /dev/null @@ -1,22 +0,0 @@ -# Staging proxy workflow for CI_Toolkit -- copy to .github/workflows/ci-serialisation.yml in your -# staging org proxy repo (e.g. BuroHappoldEngineeringSandbox/CI_Toolkit_Proxy). -# -# Required by rulesets: beta - -name: Serialisation - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - serialisation: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-serialisation.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} - with: - base_ref: ${{ github.base_ref }} diff --git a/.github/workflows/ci-unit-tests.yml b/.github/workflows/ci-unit-tests.yml index a6dd322..877368a 100644 --- a/.github/workflows/ci-unit-tests.yml +++ b/.github/workflows/ci-unit-tests.yml @@ -1,15 +1,16 @@ -# Proxy workflow for CI_Toolkit — copy to .github/workflows/ci-unit-tests.yml in your -# org's proxy repo (e.g. BHoM/CI_Proxy). +# Proxy workflow. Copy to .github/workflows/ci-unit-tests.yml in your org's proxy +# repo and require /.github/workflows/ci-unit-tests.yml@develop in the +# org ruleset for the alpha, beta maturity tier(s). # -# Required by rulesets: alpha, beta +# Rulesets ignore event filters on required workflows, so this file has +# no paths filter. The composite self-skips when no relevant files have changed. # -# The org ruleset for each applicable maturity tier should require: -# /.github/workflows/ci-unit-tests.yml@main -# -# Note: paths filters are ignored by GitHub org rulesets — the workflow always runs on -# every pull_request. Early exits within the reusable workflow handle no-op cases. +# Extending orgs: override test_toolkit_repo via with: to point at a fork. +# Dep forks must carry the relevant changes on the PR's base branch, +# not the fork's default branch, since resolve-dependencies clones from the base. +# Workflow name CI keeps check contexts bare: required contexts are the job names. -name: Unit Tests +name: CI on: pull_request: @@ -20,9 +21,13 @@ concurrency: jobs: unit-tests: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-unit-tests.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} - with: - pr_number: ${{ github.event.pull_request.number }} + runs-on: windows-2025-vs2026 + timeout-minutes: 30 + steps: + - name: Run unit tests + uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/actions/ci-unit-tests@develop + with: + app_id: ${{ secrets.BHOM_APP_ID }} + private_key: ${{ secrets.BHOM_APP_PRIVATE_KEY }} + # For extending orgs, uncomment and set your fork path: + # test_toolkit_repo: 'YourOrg/Test_Toolkit' diff --git a/.github/workflows/ci-versioning.yml b/.github/workflows/ci-versioning.yml deleted file mode 100644 index f021aa7..0000000 --- a/.github/workflows/ci-versioning.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Sandbox proxy — calls CI_Toolkit on develop. - -name: Versioning - -on: - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} - cancel-in-progress: true - -jobs: - versioning: - uses: BuroHappoldEngineeringAdmin/CI_Toolkit/.github/workflows/ci-versioning.yml@develop - secrets: - BHOM_APP_ID: ${{ secrets.BHOM_APP_ID }} - BHOM_APP_PRIVATE_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} - with: - versioning_toolkit_repo: 'BuroHappoldEngineeringSandbox/Versioning_Toolkit' diff --git a/.github/workflows/debug-app-credentials.yml b/.github/workflows/debug-app-credentials.yml deleted file mode 100644 index a9c4996..0000000 --- a/.github/workflows/debug-app-credentials.yml +++ /dev/null @@ -1,70 +0,0 @@ -name: Debug App Credentials (Sandbox) - -# Tests whether BHOM_APP_ID and BHOM_APP_PRIVATE_KEY are accessible -# directly from this proxy repo's context (no cross-org call involved). -# -# If APP_ID shows as empty here, the secret is not accessible to this repo -# in the sandbox org — check the org secret repository access settings. -# If APP_ID is non-empty and token mints successfully, the issue is with -# secrets:inherit across org boundaries in the reusable workflow call. - -on: - workflow_dispatch: - -jobs: - debug-credentials: - runs-on: ubuntu-latest - steps: - - name: Check secret availability (sandbox context) - id: secret-check - env: - APP_ID: ${{ secrets.BHOM_APP_ID }} - APP_KEY: ${{ secrets.BHOM_APP_PRIVATE_KEY }} - run: | - echo "=== Sandbox proxy secret availability ===" - echo "BHOM_APP_ID length: ${#APP_ID}" - echo "BHOM_APP_PRIVATE_KEY length: ${#APP_KEY}" - - if [ -z "$APP_ID" ]; then - echo "::error::BHOM_APP_ID is empty in sandbox proxy context." - echo " The secret exists in the org but is NOT accessible to this repo." - echo " Fix: org Settings -> Secrets -> BHOM_APP_ID -> Repository access -> add CI_Toolkit." - echo "available=false" >> "$GITHUB_OUTPUT" - else - echo "::notice::BHOM_APP_ID is present (length ${#APP_ID}). Secret IS accessible here." - echo "available=true" >> "$GITHUB_OUTPUT" - fi - - if [ -z "$APP_KEY" ]; then - echo "::error::BHOM_APP_PRIVATE_KEY is empty in sandbox proxy context." - else - echo "::notice::BHOM_APP_PRIVATE_KEY is present (length ${#APP_KEY})." - fi - - - name: Mint token (sandbox context) - id: app-token - if: steps.secret-check.outputs.available == 'true' - uses: actions/create-github-app-token@07e2b760664f080c40eec4eacf7477256582db36 - with: - client-id: ${{ secrets.BHOM_APP_ID }} - private-key: ${{ secrets.BHOM_APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - - - name: Verify token - if: steps.secret-check.outputs.available == 'true' - env: - TOKEN: ${{ steps.app-token.outputs.token }} - run: | - if [ -z "$TOKEN" ]; then - echo "::error::Token mint failed despite secrets being present." - exit 1 - fi - echo "::notice::Token minted successfully (length ${#TOKEN})." - RESPONSE=$(curl -sf -H "Authorization: Bearer $TOKEN" \ - "https://api.github.com/installation/repositories?per_page=1" 2>&1) || true - if echo "$RESPONSE" | grep -q '"total_count"'; then - COUNT=$(echo "$RESPONSE" | python3 -c "import sys,json; print(json.load(sys.stdin).get('total_count','?'))" 2>/dev/null || echo "?") - echo "::notice::Token scope OK — installation repo count: $COUNT" - else - echo "::warning::Could not verify token scope. Response: $RESPONSE" - fi