Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 8 additions & 10 deletions .github/workflows/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,24 +172,22 @@ def stop_containers(project_name):
@click.option('--github_ref')
@click.option('--github_sha')
@click.option('--token')
@click.option('--is_draft')
@click.option('--labels')
@click.option('--pr_url')
@click.option('--pr_number')
def trigger_proxy_action(head_ref_branch, base_ref_branch, github_ref, github_sha, token, is_draft, labels,
def trigger_proxy_action(head_ref_branch, base_ref_branch, github_ref, github_sha, token, labels,
pr_url, pr_number):
is_develop_branch = github_ref in ['refs/heads/develop', 'refs/heads/master']
is_tag_creating = 'refs/tags/' in github_ref
is_version_branch = re.match(VERSION_BRANCH_TEMPLATE, github_ref.replace("refs/heads/", "")) is not None
is_FTS_labeled_not_draft = 'fullTestSuit' in labels and is_draft != "true"
is_extended_FTS_labeled_not_draft = 'extendedFullTestSuit' in labels and is_draft != "true"
is_FTS_labeled = 'fullTestSuit' in labels

if is_extended_FTS_labeled_not_draft:
test_set = "extendedFullTestSuite"
elif is_develop_branch or is_tag_creating or is_version_branch or is_FTS_labeled_not_draft:
test_set = "fullTestSuite"

if is_develop_branch or is_tag_creating or is_version_branch or is_FTS_labeled:
full_test_suite = True
else:
test_set = "basic"
full_test_suite = False


github = GithubClient(token)

Expand All @@ -210,7 +208,7 @@ def trigger_proxy_action(head_ref_branch, base_ref_branch, github_ref, github_sh

runs_before = github.get_proxy_runs_list(proxy_branch)
runs_count_before = github.get_proxy_runs_count(proxy_branch)
github.run_proxy_dispatches(proxy_branch, github_ref, github_sha, test_set, initial_pr)
github.run_proxy_dispatches(proxy_branch, github_ref, github_sha, full_test_suite, initial_pr)
wait_condition(lambda: github.get_proxy_runs_count(proxy_branch) > runs_count_before)

runs_after = github.get_proxy_runs_list(proxy_branch)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/github_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def get_proxy_runs_count(self, proxy_branch):
f"{self.proxy_endpoint}/actions/workflows/pipeline.yml/runs?branch={proxy_branch}", headers=self.headers)
return int(response.json()["total_count"])

def run_proxy_dispatches(self, proxy_branch, github_ref, github_sha, test_set, initial_pr):
def run_proxy_dispatches(self, proxy_branch, github_ref, github_sha, full_test_suite, initial_pr):
data = {"ref": proxy_branch,
"inputs": {"test_set": test_set,
"inputs": {"full_test_suite": full_test_suite,
"neon_evm_commit": github_sha,
"neon_evm_branch": github_ref,
"initial_pr": initial_pr}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ jobs:
--github_sha=${GITHUB_SHA} \
--neon_test_branch=${{ steps.neon_test_branch.outputs.value }} \
--base_ref_branch=${{ github.base_ref }}
- name: Cancel the build if job failed
if: "failure()"
uses: "andymckay/[email protected]"
trigger-proxy-tests:
runs-on: trigger-runner
needs:
Expand All @@ -93,10 +96,12 @@ jobs:
--base_ref_branch=${{ github.base_ref }} \
--github_ref=${{ github.ref }} \
--token=${{secrets.GHTOKEN }} \
--is_draft=${{github.event.pull_request.draft}} \
--labels='${{ toJson(github.event.pull_request.labels.*.name) }}' \
--pr_url="${{ github.api_url }}/repos/${{ github.repository }}/issues" \
--pr_number="${{ github.event.pull_request.number }}"
- name: Cancel the build if job failed
if: "failure()"
uses: "andymckay/[email protected]"
finalize-image:
runs-on: neon-evm-1
needs:
Expand Down