diff --git a/.github/workflows/deploy.py b/.github/workflows/deploy.py index 203df3a76..f53d5e0eb 100644 --- a/.github/workflows/deploy.py +++ b/.github/workflows/deploy.py @@ -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) @@ -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) diff --git a/.github/workflows/github_api_client.py b/.github/workflows/github_api_client.py index 352e53b82..3a9ee7b6a 100644 --- a/.github/workflows/github_api_client.py +++ b/.github/workflows/github_api_client.py @@ -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} diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 42109142b..ad3fe313c 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -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/cancel-action@0.4" trigger-proxy-tests: runs-on: trigger-runner needs: @@ -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/cancel-action@0.4" finalize-image: runs-on: neon-evm-1 needs: