Skip to content

Commit 17b5e21

Browse files
committed
codecov
1 parent 6741d61 commit 17b5e21

File tree

2 files changed

+15
-24
lines changed

2 files changed

+15
-24
lines changed

.coverage

33.4 KB
Binary file not shown.

.github/workflows/python-package.yml

+15-24
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
pull_request:
1010
branches: [ "main" ]
1111

12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
15+
env:
16+
FORCE_COLOR: 3
17+
PROJECT_NAME: "diff_visualizer"
18+
1219
jobs:
1320
build:
1421

@@ -19,15 +26,15 @@ jobs:
1926
python-version: ["3.9"]
2027

2128
steps:
22-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
2330
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v3
31+
uses: actions/setup-python@v5
2532
with:
2633
python-version: ${{ matrix.python-version }}
2734
- name: Install dependencies
2835
run: |
2936
python -m pip install --upgrade pip
30-
python -m pip install flake8 pytest coverage
37+
python -m pip install flake8 pytest pytest-cov coverage
3138
pip install -r requirements.txt
3239
3340
- name: Clone diff_predictor and diff_classifier
@@ -56,28 +63,12 @@ jobs:
5663
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
5764
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
5865
59-
- name: Run tests with coverage
66+
- name: Run tests with pytest and pytest-cov
6067
run: |
61-
coverage run -m pytest
62-
coverage report -m --fail-under=50 --skip-covered
63-
64-
COVERAGE_PERCENT=$(coverage report -m --skip-covered | awk '/TOTAL/ { print $4 }' | sed 's/%$//' | awk '{ printf "%d\n", $1 }')
65-
66-
echo "COVERAGE_PERCENT=${COVERAGE_PERCENT}" >> $GITHUB_ENV
67-
68-
69-
- name: Save coverage report
70-
uses: actions/upload-artifact@v2
71-
with:
72-
name: coverage-report
73-
path: coverage.xml
68+
pytest -vvv -cov=${{ env.PROJECT_NAME }} --cov-report=xml --cov-report=term diff_viz/tests/
7469
75-
- name: Upload coverage reports to Codecov
76-
uses: codecov/codecov-action@v4.0.1
77-
with:
78-
token: ${{ secrets.CODECOV_TOKEN }}
79-
slug: Nance-Lab/diff_diff_visualizer
70+
- name: Upload coverage to Codecov
71+
uses: codecov/codecov-action@v4
8072

81-
# - name: Coveralls GitHub Action
82-
# uses: coverallsapp/github-action@v1
8373

74+

0 commit comments

Comments
 (0)