Skip to content

Add NewtonJointAPI and newton:jointModel #200

Add NewtonJointAPI and newton:jointModel

Add NewtonJointAPI and newton:jointModel #200

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
tags: [ '*' ]
pull_request:
branches: [ main ]
workflow_dispatch: # Manual trigger from Actions tab
permissions:
contents: read
pull-requests: write # Required to comment on PRs
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Check uv lock file
run: uv lock --check
- name: Run linting
run: uv run --group dev poe lint
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Build package
run: uv build
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: newton-usd-schemas-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
path: dist/
test:
needs: build
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
exclude:
# usd-exchange is not available for Python 3.13 on aarch64
- os: ubuntu-24.04-arm
python-version: '3.13'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Bootstrap
uses: ./.github/actions/bootstrap
with:
python-version: ${{ matrix.python-version }}
- name: Download artifacts
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: newton-usd-schemas-dist-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
path: dist/
- name: Run tests
run: uv run --group dev poe test-ci
- name: Upload report artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: newton-usd-schemas-coverage-${{ matrix.os }}-${{ matrix.python-version }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) || format('{0}', github.ref_name) }}
include-hidden-files: true
path: |
${{ github.workspace }}/.coverage.xml
${{ github.workspace }}/.results.xml
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
with:
files: ${{ github.workspace }}/.results.xml
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
files: ${{ github.workspace }}/.coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
deploy:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
- test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/newton-usd-schemas
permissions:
id-token: write
steps:
- name: Download wheel and source tarball
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: newton-usd-schemas-dist-${{ github.ref_name }}
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc