From 96616d5c1a9a91d18b2fa7e0bda8c6e61b241b71 Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 14 Apr 2024 18:31:28 -0700 Subject: [PATCH] Move extra delay to a separate job to avoid wasting GH action quota by sleeping in duplicated jobs --- .github/workflows/go-test.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 3111528..a21780d 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -9,8 +9,19 @@ on: branches: [ master ] jobs: + extra-delay: + runs-on: ubuntu-latest + steps: + - name: Extra Delay + if: ${{ startsWith(github.event.head_commit.message, 'Release') }} + run: | + + # If this is a release, then sleep for before starting the tests so that the newest version is released + # and pushed to the updated server before we run the tests + sleep 1200 # 20 minutes test: runs-on: ${{ matrix.os }} + needs: extra-delay strategy: matrix: os: [ubuntu-latest, macos-latest, macos-14] @@ -58,13 +69,6 @@ jobs: uses: datadog/agent-github-action@v1.3 with: api_key: ${{ secrets.DD_API_KEY }} - - name: Extra Delay - if: ${{ startsWith(github.event.head_commit.message, 'Release') }} - run: | - - # If this is a release, then sleep for before starting the tests so that the newest version is released - # and pushed to the updated server before we run the tests - sleep 1200 # 20 minutes - name: Go test env: DD_API_KEY: ${{ secrets.DD_API_KEY }}