fix: added codecov to ci and made linter happy :) (#335)
Signed-off-by: bl1nkker <[email protected]>
This commit is contained in:
@@ -34,20 +34,19 @@ jobs:
|
|||||||
- name: Build project for distribution
|
- name: Build project for distribution
|
||||||
run: |
|
run: |
|
||||||
python3.7 -m build
|
python3.7 -m build
|
||||||
|
|
||||||
test-linux:
|
test-linux:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ['2.7', '3.7', '3.8', '3.9', '3.10', '3.11']
|
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
experimental: [false]
|
experimental: [false]
|
||||||
include:
|
include:
|
||||||
- os: 'ubuntu-20.04'
|
- os: "ubuntu-20.04"
|
||||||
python-version: '3.5'
|
python-version: "3.5"
|
||||||
experimental: false
|
experimental: false
|
||||||
- os: 'ubuntu-20.04'
|
- os: "ubuntu-20.04"
|
||||||
python-version: '3.6'
|
python-version: "3.6"
|
||||||
experimental: false
|
experimental: false
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -69,6 +68,11 @@ jobs:
|
|||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: |
|
run: |
|
||||||
python setup.py test
|
python setup.py test
|
||||||
|
- name: Upload coverage to Codecov
|
||||||
|
uses: codecov/codecov-action@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
files: ./junit/opensearch-py-codecov.xml
|
||||||
|
|
||||||
twine-check:
|
twine-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -77,7 +81,7 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
python-version: "3.x"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
|||||||
@@ -94,13 +94,17 @@ def run_all(argv=None):
|
|||||||
junit_xml = join(
|
junit_xml = join(
|
||||||
abspath(dirname(dirname(__file__))), "junit", "opensearch-py-junit.xml"
|
abspath(dirname(dirname(__file__))), "junit", "opensearch-py-junit.xml"
|
||||||
)
|
)
|
||||||
|
codecov_xml = join(
|
||||||
|
abspath(dirname(dirname(__file__))), "junit", "opensearch-py-codecov.xml"
|
||||||
|
)
|
||||||
argv = [
|
argv = [
|
||||||
"pytest",
|
"pytest",
|
||||||
"--cov=opensearch",
|
"--cov=opensearchpy",
|
||||||
"--junitxml=%s" % junit_xml,
|
"--junitxml=%s" % junit_xml,
|
||||||
"--log-level=DEBUG",
|
"--log-level=DEBUG",
|
||||||
"--cache-clear",
|
"--cache-clear",
|
||||||
"-vv",
|
"-vv",
|
||||||
|
"--cov-report=xml:%s" % codecov_xml,
|
||||||
]
|
]
|
||||||
|
|
||||||
secured = False
|
secured = False
|
||||||
|
|||||||
Reference in New Issue
Block a user