Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: disable runs on draft prs #1380

Merged
merged 23 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
cb73e80
ci: disable runs on draft prs
strophy Sep 8, 2023
f0aaa0b
fix: runs fail to trigger on dispatch or schedule
strophy Sep 8, 2023
c058229
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Sep 11, 2023
e1f6a7e
Revert "fix: runs fail to trigger on dispatch or schedule"
strophy Sep 11, 2023
3a30813
Revert "ci: disable runs on draft prs"
strophy Sep 11, 2023
f4b3f76
chore: trigger ci only when tag is tag is present
strophy Sep 11, 2023
1a8d5e8
chore: blank commit to trigger ci
strophy Sep 11, 2023
98c2950
chore: debug github context
strophy Sep 11, 2023
a7ac9ab
ci: try different method to read labels
strophy Sep 11, 2023
27f96e7
chore: try another empty commit
strophy Sep 11, 2023
074f56a
chore: remove debug
strophy Sep 11, 2023
da899d2
chore: trigger on pr labeled
strophy Sep 11, 2023
c20df66
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Sep 12, 2023
66e50ca
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Sep 18, 2023
6d2c532
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Sep 21, 2023
8902eab
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Sep 21, 2023
d8b23d2
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Sep 22, 2023
6d2c92c
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Oct 3, 2023
1c75396
Revert "Revert "ci: disable runs on draft prs""
strophy Oct 3, 2023
845c747
Revert "Revert "fix: runs fail to trigger on dispatch or schedule""
strophy Oct 3, 2023
580fccb
chore: test push to draft pr
strophy Oct 3, 2023
bf4fa54
fix: duplicate condition results in invalid yaml syntax
strophy Oct 3, 2023
ef4e655
Merge branch 'v0.25-dev' into ci/disable-draft-runs
strophy Oct 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dapi-grpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dash-spv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dashmate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dashpay-contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/js-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/js-dapi-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/js-dash-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/js-dpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/js-grpc-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/platform-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/rs-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -62,7 +65,6 @@ jobs:

check_structure_changes:
runs-on: ubuntu-latest

steps:
- name: Checkout base commit
uses: actions/checkout@v2
Expand Down Expand Up @@ -98,15 +100,15 @@ 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."
else
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."
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rs-dpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/rs-drive-abci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/wallet-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/wasm-dpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading