Skip to content

Commit

Permalink
CI: add smoke tests, tests and update release
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Feb 23, 2024
1 parent aa1540a commit 7108d00
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,24 @@ jobs:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
use-python-cache: false

smoke-tests:
name: Build and Smoke tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
should-release:
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }}
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@v5
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

doc-style:
name: Documentation style
runs-on: ubuntu-latest
Expand All @@ -38,6 +56,26 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

tests:
name: Test and coverage
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/tests-pytest@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Coverage Results
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: .cov/html
retention-days: 7

# =================================================================================================
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# =================================================================================================

doc-build:
name: Build documentation
runs-on: [pyaedt, Windows]
Expand Down Expand Up @@ -133,5 +171,21 @@ jobs:
./documentation-html.zip
./documentation-pdf/*.pdf
release:
name: Release project
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [code-style, doc-build]
runs-on: ubuntu-latest
steps:
# TODO: update if ever public
# - name: Release to the public PyPI repository
# uses: ansys/actions/release-pypi-public@v5
# with:
# library-name: ${{ env.PACKAGE_NAME }}
# twine-username: "__token__"
# twine-token: ${{ secrets.PYPI_TOKEN }}

- name: Release to GitHub
uses: ansys/actions/release-github@v5
with:
library-name: ${{ env.PACKAGE_NAME }}

0 comments on commit 7108d00

Please sign in to comment.