fix(ci): simplified concurrency and job eligibility criteria

This commit is contained in:
Ashwin Bharambe 2025-07-31 13:11:04 -07:00
parent d1b300ead9
commit 18576349ca
3 changed files with 17 additions and 25 deletions

View file

@ -192,7 +192,7 @@ runs:
if: ${{ always() }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: ${{ inputs.inference-mode }}-logs-${{ github.run_id }}-${{ github.run_attempt || '' }}-${{ inputs.provider }}
name: ${{ inputs.inference-mode }}-logs-${{ github.run_id }}-${{ github.run_attempt || '' }}-${{ inputs.provider }}-${{ inputs.run-vision-tests }}-${{ inputs.stack-config }}
path: |
*.log
retention-days: 1

View file

@ -38,27 +38,23 @@ on:
concurrency:
# This creates three concurrency groups:
# ${{ github.workflow }}-${{ github.ref }}-rerecord (for valid triggers with re-record-tests label)
# ${{ github.workflow }}-${{ github.ref }}-replay (for valid triggers without re-record-tests label)
# ${{ github.workflow }}-${{ github.ref }}-no-run (for invalid triggers that will be skipped)
# ${{ github.workflow }}-${{ github.ref }}-rerecord (for labeled events with re-record-tests label)
# ${{ github.workflow }}-${{ github.ref }}-replay (for all non-labeled events)
# ${{ github.workflow }}-${{ github.ref }}-no-run (for labeled events without re-record-tests label)
# The "no-run" group ensures that irrelevant label events don't interfere with the real workflows.
group: >-
${{ github.workflow }}-${{ github.ref }}-${{
((github.event.action == 'opened' || github.event.action == 'synchronize') && 'replay') ||
((github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 're-record-tests')) && 'rerecord' ||
'no-run')
github.event.action == 'labeled' && (
contains(github.event.pull_request.labels.*.name, 're-record-tests') && 'rerecord' || 'no-run'
) || 'replay'
}}
cancel-in-progress: true
jobs:
discover-tests:
if: |
github.event_name == 'push' ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event.action == 'opened' ||
github.event.action == 'synchronize' ||
(github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 're-record-tests'))
github.event.action != 'labeled' ||
contains(github.event.pull_request.labels.*.name, 're-record-tests')
runs-on: ubuntu-latest
outputs:
test-types: ${{ steps.generate-test-types.outputs.test-types }}

View file

@ -30,27 +30,23 @@ on:
concurrency:
# This creates three concurrency groups:
# ${{ github.workflow }}-${{ github.ref }}-rerecord (for valid triggers with re-record-tests label)
# ${{ github.workflow }}-${{ github.ref }}-replay (for valid triggers without re-record-tests label)
# ${{ github.workflow }}-${{ github.ref }}-no-run (for invalid triggers that will be skipped)
# ${{ github.workflow }}-${{ github.ref }}-rerecord (for labeled events with re-record-tests label)
# ${{ github.workflow }}-${{ github.ref }}-replay (for all non-labeled events)
# ${{ github.workflow }}-${{ github.ref }}-no-run (for labeled events without re-record-tests label)
# The "no-run" group ensures that irrelevant label events don't interfere with the real workflows.
group: >-
${{ github.workflow }}-${{ github.ref }}-${{
((github.event.action == 'opened' || github.event.action == 'synchronize') && 'replay') ||
((github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 're-record-tests')) && 'rerecord' ||
'no-run')
github.event.action == 'labeled' && (
contains(github.event.pull_request.labels.*.name, 're-record-tests') && 'rerecord' || 'no-run'
) || 'replay'
}}
cancel-in-progress: true
jobs:
discover-tests:
if: |
github.event_name == 'push' ||
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
github.event.action == 'opened' ||
github.event.action == 'synchronize' ||
(github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 're-record-tests'))
github.event.action != 'labeled' ||
contains(github.event.pull_request.labels.*.name, 're-record-tests')
runs-on: ubuntu-latest
outputs:
rerecord-tests: ${{ steps.check-rerecord-tests.outputs.rerecord-tests }}