Skip to content

Create archive during build and use new ansys action option to only c… #63

Create archive during build and use new ansys action option to only c…

Create archive during build and use new ansys action option to only c… #63

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 }}
files: "exts"
tests:
name: "Test ${{ matrix.python-version }} with ${{ matrix.os }}"
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 }}
- name: Remove Dummy Wheel
run: |
python post_build_cleanup.py
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 }}
only-code: true