Skip to content

Commit

Permalink
ADD coverage to GitAction
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan committed Mar 6, 2024
1 parent 81bb02d commit 118aa18
Showing 1 changed file with 40 additions and 32 deletions.
72 changes: 40 additions & 32 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,40 @@
name: Python Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Run Python Tests
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: pip install .

- name: Install pytest
run: pip install pytest

- name: Run tests
run: pytest tests/
name: Python Tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Run Python Tests and Generate Coverage
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
pip install .
pip install -r requirements.txt
pip install pytest-cov codecov
- name: Run tests with coverage
run: pytest --cov=tests/

- name: Generate coverage report
run: codecov

- name: Push to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 118aa18

Please sign in to comment.