Skip to content

sync extensions with PyEnSight; address tech review issues #35

sync extensions with PyEnSight; address tech review issues

sync extensions with PyEnSight; address tech review issues #35

Workflow file for this run

name: GitHub CI
# run only on main branch. This avoids duplicated actions on PRs
on:
workflow_dispatch:
pull_request:
push:
tags:
- "*"
branches:
- main
env:
MAIN_PYTHON_VERSION: '3.10'
PACKAGE_NAME: 'ansys-tools-omniverse'
PACKAGE_NAMESPACE: 'ansys.tools.omniverse'
ENSIGHT_IMAGE: 'ghcr.io/ansys-internal/ensight_dev'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
code-style:
name: "Code style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/code-style@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
doc-style:
name: "Doc style"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
smoke-tests:
name: "Wheelhouse for ${{ matrix.os }} and ${{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
needs: code-style
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10']
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
tests:
name: "Test ${{ matrix.python-version }} with ${{ matrix.os }}"
needs: [smoke-tests]
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.10']
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: docker
run: docker pull ${{ env.ENSIGHT_IMAGE }}
- name: Run pytest
uses: ansys/actions/tests-pytest@v8
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
with:
python-version: ${{ matrix.python-version }}
requires-xvfb: true
- uses: codecov/codecov-action@v3
name: 'Upload coverage to CodeCov'
build-library:
name: "Build library"
needs: [tests]
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/build-library@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
release:
name: Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: build-library
runs-on: ubuntu-latest
steps:
- name: Release to GitHub
uses: ansys/actions/release-github@v8
with:
library-name: ${{ env.PACKAGE_NAME }}