diff --git a/.github/workflows/all-packages.yml b/.github/workflows/all-packages.yml index f95994751a7..a0929f1c9e4 100644 --- a/.github/workflows/all-packages.yml +++ b/.github/workflows/all-packages.yml @@ -3,6 +3,7 @@ name: All Packages on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - 'v[0-9]+\.[0-9]+-dev' @@ -66,6 +67,7 @@ jobs: test-suite: name: Run Platform Test Suite runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} timeout-minutes: 120 steps: - name: Check out repo @@ -187,6 +189,7 @@ jobs: test-suite-browsers: name: Run Platform Test Suite in Browsers runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} timeout-minutes: 120 steps: - name: Login to DockerHub @@ -308,6 +311,7 @@ jobs: codeql: name: Code security audit runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} permissions: actions: read contents: read diff --git a/.github/workflows/dapi-grpc.yml b/.github/workflows/dapi-grpc.yml index f0f0cfdf8e7..bdabfb93b35 100644 --- a/.github/workflows/dapi-grpc.yml +++ b/.github/workflows/dapi-grpc.yml @@ -3,6 +3,7 @@ name: DAPI gRPC on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - 'v[0-9]+\.[0-9]+-dev' diff --git a/.github/workflows/dapi.yml b/.github/workflows/dapi.yml index 4ab5ddc40ca..88169a9e8f3 100644 --- a/.github/workflows/dapi.yml +++ b/.github/workflows/dapi.yml @@ -3,6 +3,7 @@ name: DAPI on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev diff --git a/.github/workflows/dash-spv.yml b/.github/workflows/dash-spv.yml index 0d42ae8155a..96f1577adc2 100644 --- a/.github/workflows/dash-spv.yml +++ b/.github/workflows/dash-spv.yml @@ -3,6 +3,7 @@ name: Dash SPV on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - 'v[0-9]+\.[0-9]+-dev' diff --git a/.github/workflows/dashmate.yml b/.github/workflows/dashmate.yml index af892ce55ce..995c395ab8e 100644 --- a/.github/workflows/dashmate.yml +++ b/.github/workflows/dashmate.yml @@ -3,6 +3,7 @@ name: Dashmate on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev diff --git a/.github/workflows/dashpay-contract.yml b/.github/workflows/dashpay-contract.yml index 98fab6cb2f8..b5ea6a46b19 100644 --- a/.github/workflows/dashpay-contract.yml +++ b/.github/workflows/dashpay-contract.yml @@ -3,6 +3,7 @@ name: DashPay Contract on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - 'v[0-9]+\.[0-9]+-dev' diff --git a/.github/workflows/js-checks.yml b/.github/workflows/js-checks.yml index 02f1352f946..98033ced66f 100644 --- a/.github/workflows/js-checks.yml +++ b/.github/workflows/js-checks.yml @@ -27,6 +27,7 @@ jobs: lint: name: Linting runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} timeout-minutes: 15 steps: - name: Check out repo @@ -57,7 +58,7 @@ jobs: name: Tests runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] timeout-minutes: 120 - if: ${{ !inputs.skip-tests }} + if: ${{ !inputs.skip-tests && ( github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft ) }} steps: - name: Setup Firefox uses: browser-actions/setup-firefox@latest diff --git a/.github/workflows/js-dapi-client.yml b/.github/workflows/js-dapi-client.yml index 02545f89064..e442191c2cc 100644 --- a/.github/workflows/js-dapi-client.yml +++ b/.github/workflows/js-dapi-client.yml @@ -3,6 +3,7 @@ name: JS DAPI Client on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev diff --git a/.github/workflows/js-dash-sdk.yml b/.github/workflows/js-dash-sdk.yml index 5182519e94a..543044c4b40 100644 --- a/.github/workflows/js-dash-sdk.yml +++ b/.github/workflows/js-dash-sdk.yml @@ -3,6 +3,7 @@ name: JS Dash SDK on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev diff --git a/.github/workflows/js-dpp.yml b/.github/workflows/js-dpp.yml index 02c7d0f6cab..2a3553f55f8 100644 --- a/.github/workflows/js-dpp.yml +++ b/.github/workflows/js-dpp.yml @@ -3,6 +3,7 @@ name: JS DPP on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev diff --git a/.github/workflows/js-grpc-common.yml b/.github/workflows/js-grpc-common.yml index dea6d0edcbd..208d21864df 100644 --- a/.github/workflows/js-grpc-common.yml +++ b/.github/workflows/js-grpc-common.yml @@ -3,6 +3,7 @@ name: gRPC Common on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev diff --git a/.github/workflows/platform-test-suite.yml b/.github/workflows/platform-test-suite.yml index 6f0d9a003fe..20d6bf5f552 100644 --- a/.github/workflows/platform-test-suite.yml +++ b/.github/workflows/platform-test-suite.yml @@ -3,6 +3,7 @@ name: Test Suite on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev diff --git a/.github/workflows/rs-checks.yml b/.github/workflows/rs-checks.yml index 4b53ff3b94b..05eee159c8a 100644 --- a/.github/workflows/rs-checks.yml +++ b/.github/workflows/rs-checks.yml @@ -12,6 +12,7 @@ jobs: lint: name: Linting runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} timeout-minutes: 15 steps: - name: Check out repo @@ -31,6 +32,7 @@ jobs: formatting: name: Formatting runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} steps: - name: Check out repo uses: actions/checkout@v3 @@ -47,6 +49,7 @@ jobs: compile: name: Compilation errors runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} timeout-minutes: 15 steps: - name: Check out repo @@ -62,7 +65,6 @@ jobs: check_structure_changes: runs-on: ubuntu-latest - steps: - name: Checkout base commit uses: actions/checkout@v2 @@ -98,7 +100,7 @@ jobs: if [[ $file == *.rs ]]; then awk '/@append_only/,/}/' $file > "$(basename $file).append_only.pr" awk '/@immutable/,/}/' $file > "$(basename $file).immutable.pr" - + # Check append_only structures if ! diff -u "${{ steps.base_structures.outputs.base_dir }}/$(basename $file).append_only.base" "$(basename $file).append_only.pr" | grep "^-" | grep -v "@append_only" | grep -v "^-" | grep -v "^///" | grep -v "^//" | grep -v "^-$"; then echo "No deletions detected in @append_only structures in $file. Test passed." @@ -106,7 +108,7 @@ jobs: echo "Deletions detected in @append_only structures in $file. Test failed." exit 1 fi - + # Check immutable structures if ! diff -u "${{ steps.base_structures.outputs.base_dir }}/$(basename $file).immutable.base" "$(basename $file).immutable.pr" | grep -E "^\+[^/+]|^-[^/-]" ; then echo "No code changes detected in @immutable structures in $file. Test passed." @@ -120,6 +122,7 @@ jobs: test: name: Tests runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} timeout-minutes: 15 steps: - name: Check out repo diff --git a/.github/workflows/rs-dpp.yml b/.github/workflows/rs-dpp.yml index 7367a7172d0..6e9df2f6682 100644 --- a/.github/workflows/rs-dpp.yml +++ b/.github/workflows/rs-dpp.yml @@ -3,6 +3,7 @@ name: RS DPP on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - 'v[0-9]+\.[0-9]+-dev' diff --git a/.github/workflows/rs-drive-abci.yml b/.github/workflows/rs-drive-abci.yml index 6514fc8871d..047712d6880 100644 --- a/.github/workflows/rs-drive-abci.yml +++ b/.github/workflows/rs-drive-abci.yml @@ -4,6 +4,7 @@ name: RS Drive ABCI on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - 'v[0-9]+\.[0-9]+-dev' diff --git a/.github/workflows/wallet-lib.yml b/.github/workflows/wallet-lib.yml index 2fe98dbc7cf..4e9f2299005 100644 --- a/.github/workflows/wallet-lib.yml +++ b/.github/workflows/wallet-lib.yml @@ -3,6 +3,7 @@ name: JS Wallet Lib on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - 'v[0-9]+\.[0-9]+-dev' diff --git a/.github/workflows/wasm-dpp.yml b/.github/workflows/wasm-dpp.yml index cb88ccf7cbb..14ad7b2fcdd 100644 --- a/.github/workflows/wasm-dpp.yml +++ b/.github/workflows/wasm-dpp.yml @@ -3,6 +3,7 @@ name: WASM DPP on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] branches: - master - v[0-9]+\.[0-9]+-dev @@ -42,6 +43,7 @@ jobs: wasm-errors: name: WASM compilation runs-on: [ "self-hosted", "linux", "x64", "ubuntu-platform" ] + if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || !github.event.pull_request.draft }} timeout-minutes: 15 steps: - name: Check out repo