@@ -98,48 +98,24 @@ jobs:
9898 token_format : access_token
9999
100100 - name : Run pytest
101- uses : pavelzw/pytest-action@v2
102101 env :
103102 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
104103 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
105104 AWS_S3_ENDPOINT_URL : ${{ secrets.AWS_S3_ENDPOINT_URL }}
106105 LUXONISML_BUCKET : luxonis-test-bucket
107- with :
108- emoji : false
109- custom-arguments : --cov luxonis_ml --cov-report xml --junit-xml pytest.xml
106+ run :
107+ pytest --cov --junitxml=junit.xml -o junit_family=legacy
110108
111- - name : Create Test Report
112- uses : EnricoMi/publish-unit-test-result-action@v2
109+ - name : Upload test results to Codecov
113110 if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
111+ uses : codecov/test-results-action@v1
114112 with :
115- files : pytest.xml
113+ token : ${{ secrets.CODECOV_TOKEN }}
114+ fail_ci_if_error : false
116115
117- - name : Generate coverage badge
118- uses : tj-actions/coverage-badge-py@v2
116+ - name : Upload coverage results to Codecov
119117 if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
118+ uses : codecov/codecov-action@v4
120119 with :
121- output : media/coverage_badge.svg
122-
123- - name : Generate coverage report
124- 125- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
126- with :
127- coverageFile : coverage.xml
128- token : ${{ secrets.GITHUB_TOKEN }}
129-
130- - name : Commit coverage badge
131- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
132- run : |
133- git config --global user.name 'GitHub Actions'
134- git config --global user.email '[email protected] ' 135- git diff --quiet media/coverage_badge.svg || {
136- git add media/coverage_badge.svg
137- git commit -m "[Automated] Updated coverage badge"
138- }
139-
140- - name : Push changes
141- uses : ad-m/github-push-action@master
142- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8'
143- with :
144- branch : ${{ github.head_ref }}
145-
120+ token : ${{ secrets.CODECOV_TOKEN }}
121+ fail_ci_if_error : false
0 commit comments