-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1.04 KB
/
coverage.yml
File metadata and controls
34 lines (31 loc) · 1.04 KB
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
32
33
name: Coverage
on: [push]
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install pytest
pip install pytest-asyncio
pip install coverage
pip install coveralls
pip install .
- name: Calculate coverage
env:
API_KEY: ${{ secrets.TRACKUNIT_API_KEY }}
run: |
echo $API_KEY | python -c $'import sys\nkey = sys.stdin.readline().strip()\nif len(key) == 32:\n open("api.key","w").write(key)\nelse:\n print("wrong length "+str(len(key)))\n sys.exit(1)\n'
coverage run -m --source=pytrackunit pytest -x --ignore=tests\test_real_data.py
- name: Upload to coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
coveralls --service=github