Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ulya-tkch committed Sep 12, 2024
1 parent 29917f2 commit d2e6c6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/ci-test-tlm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,13 @@ name: /test-tlm CI

on:
issue_comment:
types: [created, edited]
types: [created]

jobs:
check-comment:
name: Fetch Latest Comment
runs-on: ubuntu-latest
steps:
- name: Check latest comment
run: |
COMMENT_BODY=$(gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --jq '.[-1].body')
echo "Latest comment is: $COMMENT_BODY"
if [[ "$COMMENT_BODY" == "/test-tlm" ]]; then
echo "IS_TEST_TLM_COMMENT=true" >> $GITHUB_ENV
else
echo "IS_TEST_TLM_COMMENT=false" >> $GITHUB_ENV
test:
name: "TLM Test: Python ${{ matrix.python }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
needs: check-comment
if: ${{ env.IS_TEST_TLM_COMMENT }} == 'true' # Run only if the latest comment is /test-tlm
if: github.event.comment.body == '/test-tlm' # Only run if the comment is "/test-tlm"
strategy:
matrix:
os:
Expand Down Expand Up @@ -61,7 +48,7 @@ jobs:
runs-on: ${{ matrix.os }}
needs:
- check-comment
if: ${{ env.IS_TEST_TLM_COMMENT }} == 'true' # Run only if the latest comment is /test-tlm
if: github.event.comment.body == '/test-tlm' # Only run if the comment is "/test-tlm"
strategy:
matrix:
os:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ on:
pull_request: # open between any two branches

jobs:
check-comment:
name: Fetch Latest Comment
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Check latest comment
run: |
COMMENT_BODY=$(gh api repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments --jq '.[-1].body')
echo "Latest comment is: $COMMENT_BODY"
if [[ "$COMMENT_BODY" == "/test-tlm" ]]; then
echo "IS_TEST_TLM_COMMENT=true" >> $GITHUB_ENV
else
echo "IS_TEST_TLM_COMMENT=false" >> $GITHUB_ENV
typecheck:
name: Type check
runs-on: ubuntu-latest
Expand Down

0 comments on commit d2e6c6b

Please sign in to comment.