-
Notifications
You must be signed in to change notification settings - Fork 285
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5896 from xapi-project/feature/py3
Python3 update feature merge
- Loading branch information
Showing
173 changed files
with
5,293 additions
and
8,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["2.7", "3.11"] | ||
python-version: ["3.11"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
@@ -39,48 +39,11 @@ jobs: | |
|
||
- uses: pre-commit/[email protected] | ||
name: Run pre-commit checks (no spaces at end of lines, etc) | ||
if: ${{ matrix.python-version != '2.7' }} | ||
with: | ||
extra_args: --all-files --verbose --hook-stage commit | ||
env: | ||
SKIP: no-commit-to-branch | ||
|
||
- name: Install dependencies only needed for python 2 | ||
if: ${{ matrix.python-version == '2.7' }} | ||
run: pip install enum | ||
|
||
- name: Install dependencies only needed for python 3 | ||
if: ${{ matrix.python-version != '2.7' }} | ||
run: pip install opentelemetry-api opentelemetry-exporter-zipkin-json opentelemetry-sdk pandas pytype toml wrapt | ||
|
||
- name: Install common dependencies for Python ${{matrix.python-version}} | ||
run: pip install future mock pytest-coverage pytest-mock | ||
|
||
- name: Run Pytest for python 2 and get code coverage | ||
if: ${{ matrix.python-version == '2.7' }} | ||
run: > | ||
pytest | ||
--cov=scripts --cov=ocaml/xcp-rrdd | ||
scripts/ ocaml/xcp-rrdd -vv -rA | ||
--junitxml=.git/pytest${{matrix.python-version}}.xml | ||
--cov-report term-missing | ||
--cov-report xml:.git/coverage${{matrix.python-version}}.xml | ||
env: | ||
PYTHONDEVMODE: yes | ||
|
||
- name: Run Pytest for python 3 and get code coverage | ||
if: ${{ matrix.python-version != '2.7' }} | ||
run: > | ||
pytest | ||
--cov=scripts --cov=ocaml/xcp-rrdd --cov=python3/ | ||
scripts/ ocaml/xcp-rrdd python3/ -vv -rA | ||
--junitxml=.git/pytest${{matrix.python-version}}.xml | ||
--cov-report term-missing | ||
--cov-report xml:.git/coverage${{matrix.python-version}}.xml | ||
env: | ||
PYTHONDEVMODE: yes | ||
PYTHONPATH: "python3:python3/tests/stubs" | ||
|
||
- name: Upload coverage report to Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
|
@@ -90,7 +53,6 @@ jobs: | |
parallel: true | ||
|
||
- uses: dciborow/[email protected] | ||
if: ${{ matrix.python-version != '2.7' }} | ||
with: | ||
reporter: github-pr-review | ||
level: warning | ||
|
@@ -99,8 +61,7 @@ jobs: | |
continue-on-error: true | ||
|
||
- name: Run pytype checks | ||
if: ${{ matrix.python-version != '2.7' }} | ||
run: ./pytype_reporter.py | ||
run: pip install pandas pytype toml && ./pytype_reporter.py | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.