-
Notifications
You must be signed in to change notification settings - Fork 421
31 lines (29 loc) · 922 Bytes
/
coverage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: coverage
on: [push]
permissions:
contents: read
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Set up latest Python 3
uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 # v4
with:
python-version: 3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install protobuf==3.17.3 pycodestyle coverage coveralls
- name: Test with coverage
run: |
cd python
COVERAGE_FILE=main.cov coverage run --source=phonenumbers ./testwrapper.py
COVERAGE_FILE=pb2.cov coverage run --source=phonenumbers.pb2 ./testpb2.py
coverage combine main.cov pb2.cov
- name: Upload coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
cd python
coveralls