From d69acca25896b424d6f112ae0bb9dce01f4598a0 Mon Sep 17 00:00:00 2001 From: Vladislav Polyakov Date: Wed, 23 Oct 2024 13:43:11 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=90=20Split=20actions=20on=20unprivile?= =?UTF-8?q?ged=20and=20privileged?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/ydb-slo-action-test-init.yml | 28 ++++++++++++++++ .../workflows/ydb-slo-action-test-report.yml | 24 ++++++++++++++ .github/workflows/ydb-slo-action-test.yml | 32 ------------------- 3 files changed, 52 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/ydb-slo-action-test-init.yml create mode 100644 .github/workflows/ydb-slo-action-test-report.yml delete mode 100644 .github/workflows/ydb-slo-action-test.yml diff --git a/.github/workflows/ydb-slo-action-test-init.yml b/.github/workflows/ydb-slo-action-test-init.yml new file mode 100644 index 0000000..ae00758 --- /dev/null +++ b/.github/workflows/ydb-slo-action-test-init.yml @@ -0,0 +1,28 @@ +name: ydb-slo-action-test-init + +on: + pull_request: + workflow_dispatch: + +jobs: + test-ydb-slo-action-init: + name: Test YDB SLO Action Init + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Inititialize YDB SLO Test + uses: ydb-platform/ydb-slo-action/init@main + + - name: Run chaos testing + run: echo 'CHAOS 🙈🙈🙈' + + - name: Run user workload + run: sleep 60 + + - name: Upload YDB SLO Test results + uses: actions/upload-artifact@v4 + with: + name: ydb-slo-action-test-results + path: '${{runner.temp}}' diff --git a/.github/workflows/ydb-slo-action-test-report.yml b/.github/workflows/ydb-slo-action-test-report.yml new file mode 100644 index 0000000..ee3342b --- /dev/null +++ b/.github/workflows/ydb-slo-action-test-report.yml @@ -0,0 +1,24 @@ +name: ydb-slo-action-test-report + +on: + workflow_run: + workflows: ['ydb-slo-action-test-init'] + types: + - completed + +jobs: + test-ydb-slo-action: + runs-on: ubuntu-latest + name: Test YDB SLO Action Report + permissions: + contents: read + pull-requests: write + steps: + - name: Download YDB SLO Test results + uses: actions/download-artifact@v4 + with: + name: ydb-slo-action-test-results + path: '${{runner.temp}}/ydb-slo-action-test-results' + + - name: Report YDB SLO Test results + uses: ydb-platform/ydb-slo-action/report@main diff --git a/.github/workflows/ydb-slo-action-test.yml b/.github/workflows/ydb-slo-action-test.yml deleted file mode 100644 index d8335bf..0000000 --- a/.github/workflows/ydb-slo-action-test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: ydb-slo-action-test -on: - workflow_dispatch: - pull_request_target: - types: [opened, synchronize, reopened] - -jobs: - test-ydb-slo-action: - runs-on: ubuntu-latest - name: YDB SLO Action Test - permissions: - contents: read - pull-requests: write - steps: - - name: Checkout code from PR - uses: actions/checkout@v4 - with: - repository: ${{ github.event.pull_request.head.repo.full_name }} - ref: ${{ github.event.pull_request.head.ref }} - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Inititialize YDB SLO Test - uses: ydb-platform/ydb-slo-action/init@main - - - name: Run chaos testing - run: echo 'CHAOS 🙈🙈🙈' - - - name: Run user workload - run: sleep 60 - - - name: Report YDB SLO Test results - uses: ydb-platform/ydb-slo-action/report@main