Skip to content

Update codecov/codecov-action action to v3 #51

Update codecov/codecov-action action to v3

Update codecov/codecov-action action to v3 #51

Workflow file for this run

---
name: tests
on: [push, pull_request]
jobs:
tests:
strategy:
matrix:
os:
- ubuntu-latest
runs-on: ${{ matrix.os }}
env:
PYTHON_VERSION: '3.9'
SRC_DIR: ./src/opensearch_sdk_py/protobuf
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.5.1'
- name: Set up Protobuf
uses: arduino/setup-protoc@v2
- name: Run Tests with Coverage
run: |
poetry install
protoc -I=$SRC_DIR --python_out=$SRC_DIR $SRC_DIR/*.proto
2to3 --no-diff -n -w $SRC_DIR
poetry run coverage run --source=src -m pytest -v --cov-report=xml
- name: Upload Coverage Report
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml