Skip to content

Commit

Permalink
fix: added codecov to ci and made linter happy :) (#335)
Browse files Browse the repository at this point in the history
Signed-off-by: bl1nkker <nurovich14@gmail.com>
  • Loading branch information
bl1nkker authored Apr 4, 2023
1 parent 23611eb commit 03b72c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,19 @@ jobs:
- name: Build project for distribution
run: |
python3.7 -m build
test-linux:
strategy:
fail-fast: false
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]
experimental: [false]
include:
- os: 'ubuntu-20.04'
python-version: '3.5'
- os: "ubuntu-20.04"
python-version: "3.5"
experimental: false
- os: 'ubuntu-20.04'
python-version: '3.6'
- os: "ubuntu-20.04"
python-version: "3.6"
experimental: false

runs-on: ${{ matrix.os }}
Expand All @@ -69,6 +68,11 @@ jobs:
- name: Run Tests
run: |
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:
runs-on: ubuntu-latest
Expand All @@ -77,7 +81,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 5 additions & 1 deletion test_opensearchpy/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,17 @@ def run_all(argv=None):
junit_xml = join(
abspath(dirname(dirname(__file__))), "junit", "opensearch-py-junit.xml"
)
codecov_xml = join(
abspath(dirname(dirname(__file__))), "junit", "opensearch-py-codecov.xml"
)
argv = [
"pytest",
"--cov=opensearch",
"--cov=opensearchpy",
"--junitxml=%s" % junit_xml,
"--log-level=DEBUG",
"--cache-clear",
"-vv",
"--cov-report=xml:%s" % codecov_xml,
]

secured = False
Expand Down

0 comments on commit 03b72c3

Please sign in to comment.