Skip to content

Commit

Permalink
chore: integrate codedev
Browse files Browse the repository at this point in the history
  • Loading branch information
elhoangvu committed Apr 16, 2024
1 parent 4176856 commit 23d2dbd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,24 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pyyaml
python -m pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-test.txt ]; then pip install -r requirements-test.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
- name: Run tests
env:
PY_COLORS: 1
TOXENV: cover
run: tox
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: elhoangvu/dictrule
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
18 changes: 18 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
codecov:
notify:
after_n_builds: 3
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

comment:
after_n_builds: 3
layout: "diff,flags,files"
behavior: default
require_changes: yes

github_checks:
annotations: true
4 changes: 4 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PyYAML==6.0.1
pytest==8.1.1
pytest-cov==5.0.0
tox==4.14.2

0 comments on commit 23d2dbd

Please sign in to comment.