Skip to content

741587: Add IMS stackup argument in import_odb_archve #898

741587: Add IMS stackup argument in import_odb_archve

741587: Add IMS stackup argument in import_odb_archve #898

Workflow file for this run

name: GitHub CI
on:
pull_request:
workflow_dispatch:
push:
tags:
- "*"
branches:
- main
env:
MAIN_PYTHON_VERSION: '3.10'
PACKAGE_NAME: 'ansys-sherlock-core'
PACKAGE_NAMESPACE: 'ansys.sherlock.core'
DOCUMENTATION_CNAME: 'sherlock.docs.pyansys.com'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
style:
name: Code style
runs-on: ubuntu-latest
steps:
- name: PyAnsys code style checks
uses: ansys/actions/code-style@v4
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
docs-style:
name: Documentation Style Check
runs-on: ubuntu-latest
steps:
- name: PyAnsys documentation style checks
uses: ansys/actions/doc-style@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
smoke-tests:
name: Build and Smoke tests
runs-on: ${{ matrix.os }}
needs: [ style ]
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
exclude:
- should-release: false
os: macos-latest
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v4
with:
library-name: ${{ env.PACKAGE_NAME }}
library-namespace: ${{ env.PACKAGE_NAMESPACE }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
tests:
name: Tests and coverage
needs: [ smoke-tests ]
runs-on: [ self-hosted, pysherlock ]
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Create Python venv
run: |
python -m venv .venv
.\.venv\Scripts\Activate.ps1
- name: Install packages for testing
run: |
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install --upgrade build wheel
pip install .[tests]
- name: Testing
run: |
.\.venv\Scripts\Activate.ps1
pytest -v --cov=ansys.sherlock --cov-report=term --cov-report=html:.cov/html --cov-report=xml:.cov/coverage.xml
- name: Upload coverage results
uses: actions/upload-artifact@v3
if: env.MAIN_PYTHON_VERSION == matrix.python-version
with:
name: coverage-results
path: .cov
retention-days: 7
- name: Upload coverage to Codecov
if: env.MAIN_PYTHON_VERSION == matrix.python-version
uses: codecov/codecov-action@v3
docs:
name: Documentation
needs: [ docs-style ]
runs-on: ubuntu-latest
steps:
- name: Run documentation building action
uses: ansys/actions/doc-build@v4
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
package:
name: Package library
needs: [ tests, docs ]
runs-on: ubuntu-latest
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@v4
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
release:
name: Release project
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [ package ]
runs-on: ubuntu-latest
steps:
- name: Release to the public PyPI repository
uses: ansys/actions/release-pypi-public@v4
with:
library-name: ${{ env.PACKAGE_NAME }}
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}
- name: Release to GitHub
uses: ansys/actions/release-github@v4
with:
library-name: ${{ env.PACKAGE_NAME }}
upload_dev_docs:
name: Upload dev documentation
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [ package ]
steps:
- name: Deploy the latest documentation
uses: ansys/actions/doc-deploy-dev@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
upload_docs_release:
name: Upload release documentation
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [ release ]
steps:
- name: Deploy the stable documentation
uses: ansys/actions/doc-deploy-stable@v4
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}