diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caffd056..484b4a9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -291,7 +291,7 @@ jobs: deploy: runs-on: ubuntu-latest - needs: [tests, linter, static-analysis, performance-tests] + needs: [build-image] if: github.ref == 'refs/heads/main' && github.event_name == 'push' env: SENTRY_RELEASE: whisper-money@${{ github.sha }} diff --git a/tests/Feature/SentryConfigTest.php b/tests/Feature/SentryConfigTest.php index a4572583..8a898a47 100644 --- a/tests/Feature/SentryConfigTest.php +++ b/tests/Feature/SentryConfigTest.php @@ -3,3 +3,11 @@ it('binds the sentry release from the environment', function () { expect(config('sentry.release'))->toBe(env('SENTRY_RELEASE')); }); + +it('waits for the image build before marking a sentry deploy', function () { + $workflow = file_get_contents(base_path('.github/workflows/ci.yml')); + + expect($workflow) + ->toContain("deploy:\n runs-on: ubuntu-latest\n needs: [build-image]") + ->toContain('run: sentry-cli releases deploys "$SENTRY_RELEASE" new -e production'); +});