From db16683ba2d4b511a977402f5d4a9f24189231d4 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 6 Feb 2024 18:51:36 +0100 Subject: [PATCH] ci: Simplify loadtest workflow The two different PR and Merge jobs were introduced to be able to test the main branch against the latest release. However, this is now included in the PR job, too, so no need for the two separate jobs anymore. --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/loadtest.yaml | 41 ++++++--------------------------- 2 files changed, 9 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a856f282f..cf14ada6c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,10 +11,10 @@ on: branches: - main - rel-* + concurrency: group: ${{ github.workflow }}-${{ github.ref }} - - # Terminate all previous runs of the same workflow and branch/tag, except for main and release branches/tags + # Terminate all previous runs of the same workflow and branch, except for main and release branches cancel-in-progress: "${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-')) }}" jobs: diff --git a/.github/workflows/loadtest.yaml b/.github/workflows/loadtest.yaml index 9b08fd022..96b23b0a3 100644 --- a/.github/workflows/loadtest.yaml +++ b/.github/workflows/loadtest.yaml @@ -10,14 +10,15 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + # Terminate all previous runs of the same workflow and branch, except for main + cancel-in-progress: "${{ !(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }}" + jobs: - Loadtest-PR-Nix: - name: Loadtest PR (Nix) - if: ${{ github.event_name == 'pull_request' }} + Loadtest-Nix: + name: Loadtest (Nix) runs-on: ubuntu-latest - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true steps: - uses: actions/checkout@v4 with: @@ -40,31 +41,3 @@ jobs: name: loadtest.md path: loadtest/loadtest.md if-no-files-found: error - - Loadtest-Merge-Nix: - name: Loadtest Merge (Nix) - if: ${{ github.event_name == 'push' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions-ecosystem/action-get-latest-tag@v1 - id: get-latest-tag - with: - semver_only: true - - name: Setup Nix Environment - uses: ./.github/actions/setup-nix - with: - tools: loadtest - - name: Run loadtest - run: | - postgrest-loadtest-against ${{ steps.get-latest-tag.outputs.tag }} - postgrest-loadtest-report > loadtest/loadtest.md - - name: Upload report - uses: actions/upload-artifact@v4 - with: - name: loadtest.md - path: loadtest/loadtest.md - if-no-files-found: error -