Skip to content

Commit

Permalink
Configure permissions for GitHub Actions in pytest.yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
K-dash committed May 29, 2024
1 parent aeaa456 commit 3531d9b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Pytest

permissions:
contents: read
pull-requests: write

on: [push, pull_request]

jobs:
Expand All @@ -13,15 +17,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r dev-requirements.txt
- name: Test with pytest
run: |
set -o pipefail
python -m pytest --junitxml=pytest.xml --cov-report=term-missing --cov=src tests/ | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/[email protected]
with:
Expand Down

0 comments on commit 3531d9b

Please sign in to comment.