Skip to content

Commit

Permalink
Updated strategy to listen on comments rather than labels
Browse files Browse the repository at this point in the history
  • Loading branch information
ckunki committed May 24, 2024
1 parent 2e1008a commit fcc01b2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,8 @@ jobs:
metrics:
needs: [ ci-job ]
uses: ./.github/workflows/report.yml

gate-1-regular-ci:
name: Gate 1 (Regular CI)
needs: [ ci-job ]
uses: ./.github/workflows/branch-protection.yml
20 changes: 7 additions & 13 deletions .github/workflows/slow-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,21 @@ name: Checks

# Calls workflow/run-tests.yml without any matrix but including slow tests.

on:
workflow_call:
pull_request:
types: [ labeled ]
on: issue_comment

jobs:
display-pr-label:
runs-on: ubuntu-latest
steps:
- name: Display Pull Request Label
run: |
echo ${{ github.event.label.name }}
echo ${{ github.event.label.name == 'slow-tests' }}
tests-job:
# The first condition limits to consider only comments on pull requests
# rather than on GitHub issues.
if: ${{ github.event.issue.pull_request &&
contains(github.event.comment.body, '[run-slow-tests]') }}
uses: ./.github/workflows/run-tests.yml
secrets: inherit
with:
slow-tests: ${{ github.event.label.name == 'slow-tests' }}
slow-tests: true
python-version: "3.10"

branch-protection:
name: Gate 2 (Allow Merge)
needs: [ tests-job ]
uses: ./.github/workflows/branch-protection.yml

0 comments on commit fcc01b2

Please sign in to comment.