Skip to content

Commit

Permalink
chore: Add GitHub Actions step to comment on PRs for successful tests…
Browse files Browse the repository at this point in the history
… and linting
  • Loading branch information
provos committed Aug 30, 2024
1 parent 3a0e458 commit ef0caba
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ jobs:
- name: Run tests
run: |
poetry run pytest
- name: Comment PR
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.name,
body: '✅ Tests passed for Python ${{ matrix.python-version }}!'
})
lint:
runs-on: ubuntu-latest
Expand All @@ -45,6 +57,18 @@ jobs:
run: |
poetry run flake8 .
poetry run black --check .
- name: Comment PR
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.name,
body: '✅ Linting passed!'
})
publish:
needs: [test, lint]
Expand Down

0 comments on commit ef0caba

Please sign in to comment.