Skip to content

Commit

Permalink
Update coverage upload process (#1131)
Browse files Browse the repository at this point in the history
- Migrate to coverallsapp github action
  - Clean up dependencies
  - Use lcov instead of xml
  • Loading branch information
arkid15r authored May 1, 2023
1 parent 5c1f026 commit d0f7058
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade 'coveralls>=3' pip
python -m pip install --upgrade pip
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install --editable .
python -m pip install .
- name: Run Tests
run: |
make test
- name: Upload Coverage
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: tests-${{ matrix.python-version }}-${{ matrix.os }}
COVERALLS_PARALLEL: true
uses: coverallsapp/github-action@v2
with:
flag-name: tests-${{ matrix.python-version }}-${{ matrix.os }}
parallel: true
path-to-lcov: coverage.lcov

build:
name: Build Distribution
Expand All @@ -66,8 +66,9 @@ jobs:
python-version: '3.11'
- name: Install Dependencies
run: |
python -m pip install --upgrade build pip polib
pip install --upgrade .
python -m pip install --upgrade pip
python -m pip install --upgrade build polib
pip install .
- name: Build Distribution
run: |
make package
Expand All @@ -77,19 +78,15 @@ jobs:
name: dist
path: dist


coveralls:
name: Finish Coveralls
needs: [test]
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
python -m pip install --upgrade 'coveralls>=3' pip
coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: coverallsapp/github-action@v2
with:
parallel-finished: true

deploy:
name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MANIFEST
*.pot
*.pyc
*.DS_Store
coverage.xml
coverage.lcov
.tox
.venv
docs/build
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ setup:

test:
scripts/l10n/generate_mo_files.py
pytest --cov=. --cov-config=pyproject.toml --cov-report term --cov-report xml --durations 10 --durations-min=0.75 --dist loadscope --no-cov-on-fail --numprocesses auto
pytest --cov=. --cov-config=pyproject.toml --cov-report term --cov-report lcov --durations 10 --durations-min=0.75 --dist loadscope --no-cov-on-fail --numprocesses auto

tox:
tox --parallel auto
1 change: 0 additions & 1 deletion requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Package runtime requirements.
convertdate>=2.3.0
hijri-converter
korean-lunar-calendar
python-dateutil
2 changes: 1 addition & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Test requirements.
coverage[toml]<7.0.0
coverage
pytest
pytest-cov
pytest-xdist
Expand Down

0 comments on commit d0f7058

Please sign in to comment.