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 -