Skip to content

Commit

Permalink
Restricting the types of PRs, formatting & only create artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
Fovty committed Jun 4, 2024
1 parent c8ee7b4 commit 27591f0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Python Tests
on:
push:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
Expand All @@ -13,21 +14,20 @@ permissions:
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Run pytest with coverage and generate report
run: poetry run pytest --cov=tests --cov-report=xml tests/
- name: Upload coverage to Cobertura
uses: 5monkeys/cobertura-action@master
with:
path: coverage.xml
minimum_coverage: 70
skip_covered: false
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry
poetry install
- name: Run pytest with coverage and generate report
run: poetry run pytest --cov=tests --cov-report=xml tests/
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.xml

0 comments on commit 27591f0

Please sign in to comment.