-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (47 loc) · 1.87 KB
/
Copy pathpython-package.yml
File metadata and controls
49 lines (47 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python CI
on: [push]
env:
# This variable is required for Qt to work on CI.
# https://gist.github.com/popzxc/70fe145a3a1109d5c11f7b2f06dd269f
QT_QPA_PLATFORM: "offscreen"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.9"
install-arguments: ".[create] PySide2 usd-core==21.11 PyOpenGL" # 21.11 enables AR-2.0 by default
- python-version: "3.10"
install-arguments: ". pygraphviz PySide2 usd-core==23.2 PyOpenGL"
- python-version: "3.13"
install-arguments: ".[full,create]"
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up Graphviz
uses: ts-graphviz/setup-graphviz@v2
- name: Install Required Libraries
# Needed for PySide6 CI only: https://stackoverflow.com/questions/75907862/pyside6-wsl2-importerror-libegl-so-1
if: "matrix.python-version == '3.13'"
run: |
sudo apt-get install -y libegl1
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov codecov
python -m pip install ${{ matrix.install-arguments }}
- name: Test
run: |
PYTHONWARNINGS=error,ignore:::pyparsing pytest --cov --durations=10 .
# https://github.com/marketplace/actions/codecov
- name: Codecov Report
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}