From fb38a832a7d0de8ea8ca404bc47cc6b7ed98c5f1 Mon Sep 17 00:00:00 2001 From: Aaron Lademann Date: Wed, 3 Apr 2024 08:28:39 -0700 Subject: [PATCH] Update condition to mimic tag build --- .github/workflows/coverage.yml | 10 ++++++---- .github/workflows/source-check.yml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 38e570099f..ede60deb86 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -42,20 +42,22 @@ jobs: runs-on: ubuntu-latest needs: [ get-cached-coverage ] steps: + - env: + USE_CACHED_COVERAGE: ${{ needs.get-cached-coverage.outputs.cache-hit && inputs.use_cached_coverage }} - uses: actions/checkout@v4 - if: ${{ !needs.get-cached-coverage.outputs.cache-hit || !inputs.use_cached_coverage }} + if: ${{ $USE_CACHED_COVERAGE }} - uses: dart-lang/setup-dart@v1 - if: ${{ !needs.get-cached-coverage.outputs.cache-hit || !inputs.use_cached_coverage }} + if: ${{ $USE_CACHED_COVERAGE }} with: sdk: ${{ inputs.sdk }} - name: Run Tests (DDC + coverage) - if: ${{ !needs.get-cached-coverage.outputs.cache-hit || !inputs.use_cached_coverage }} + if: ${{ $USE_CACHED_COVERAGE }} run: dart run dart_dev test --test-args="--coverage=reports/coverage" -P dartdevc - name: Upload New Coverage Data - if: ${{ !needs.get-cached-coverage.outputs.cache-hit || !inputs.use_cached_coverage }} + if: ${{ $USE_CACHED_COVERAGE }} uses: actions/upload-artifact@v4 with: name: coverage diff --git a/.github/workflows/source-check.yml b/.github/workflows/source-check.yml index 157375fc79..4708e10e50 100644 --- a/.github/workflows/source-check.yml +++ b/.github/workflows/source-check.yml @@ -46,7 +46,7 @@ jobs: - name: Check Github Ref id: check_gh_ref run: | - echo "is_tag_build=${{ contains(github.head_ref, 'refs/tags') }}" >> "$GITHUB_OUTPUT" + echo "is_tag_build=${{ contains(github.head_ref, 'test') }}" >> "$GITHUB_OUTPUT" - name: Check Modified Files id: check_files run: |