diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index dcde0c1c..737a575a 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -44,7 +44,7 @@ jobs: # with: # token: ${{ secrets.GITHUB_TOKEN }} - smoke-tests: + smoketest: name: Build and smoke tests runs-on: ${{ matrix.os }} needs: [ style ] @@ -54,16 +54,22 @@ jobs: os: [ ubuntu-latest, windows-latest ] python-version: [ '3.10', '3.11', '3.12', '3.13' ] steps: - - name: Build wheelhouse and perform smoke test + - name: Build wheelhouse uses: ansys/actions/build-wheelhouse@v8 with: library-name: ${{ env.PACKAGE_NAME }} operating-system: ${{ matrix.os }} python-version: ${{ matrix.python-version }} + - name: Install library + run: python --version && python -m pip install ${{ env.install_target }} + + - name: Run smoketest + run: make smoketest + test: name: Testing - needs: [ smoke-tests ] + needs: [ smoketest ] runs-on: ${{ matrix.os }} strategy: matrix: @@ -109,7 +115,7 @@ jobs: docs: name: Build docs runs-on: ubuntu-latest - # needs: [docs-style] +# needs: [docs-style] steps: - name: Run Ansys documentation building action uses: ansys/actions/doc-build@v8 @@ -120,7 +126,7 @@ jobs: package: name: Package library - needs: [ test, docs ] + needs: [ test ] runs-on: ubuntu-latest steps: - name: Build library source and wheel artifacts @@ -152,7 +158,7 @@ jobs: name: Upload dev documentation if: github.ref == 'refs/heads/main' runs-on: ubuntu-latest - needs: [ package ] + needs: [ docs, package ] steps: - name: Deploy the latest documentation uses: ansys/actions/doc-deploy-dev@v8 @@ -167,7 +173,7 @@ jobs: name: Upload release documentation if: github.event_name == 'push' && contains(github.ref, 'refs/tags') runs-on: ubuntu-latest - needs: [ release ] + needs: [ docs, release ] steps: - name: Deploy the stable documentation uses: ansys/actions/doc-deploy-stable@v8 @@ -181,7 +187,7 @@ jobs: build-failure: name: Teams notify on failure if: failure() && (github.event_name == 'pull_request' || github.ref == 'refs/heads/main' || github.ref_type == 'tag') - needs: [ style, test ] + needs: [ package ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -189,7 +195,7 @@ jobs: uses: jdcargile/ms-teams-notification@v1.4 with: github-token: ${{ github.token }} # this will use the runner's token. - ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} - notification-summary: GitHub CI failure - ${{ github.event.pull_request.title }} + ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI_CI }} + notification-summary: CI build failure notification-color: dc3545 timezone: America/New_York diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c8583168..51d98706 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,7 +10,6 @@ env: PACKAGE_NAME: 'ansys-dynamicreporting-core' PACKAGE_NAMESPACE: 'ansys.dynamicreporting.core' - jobs: nightly_test: @@ -73,7 +72,7 @@ jobs: build-failure: name: Teams notify on failure if: failure() - needs: [ nightly_test, nightly_and_upload ] + needs: [ nightly_and_upload ] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -81,7 +80,7 @@ jobs: uses: jdcargile/ms-teams-notification@v1.4 with: github-token: ${{ github.token }} - ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }} - notification-summary: Nightly failure + ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI_NIGHTLY }} + notification-summary: Nightly build failure notification-color: dc3545 timezone: America/New_York diff --git a/Makefile b/Makefile index d5dc7fa0..eb197bcd 100644 --- a/Makefile +++ b/Makefile @@ -31,8 +31,7 @@ test: pytest -rvx --setup-show --cov=ansys.dynamicreporting.core --cov-report html:coverage-html --cov-report term --cov-report xml:coverage.xml smoketest: - python -c "from ansys.dynamicreporting.core import __version__; print(__version__)" - python -c "from ansys.dynamicreporting.core import Service" + python tests/smoketest.py clean: rm -rf dist build diff --git a/codegen/rename_whl.py b/codegen/rename_whl.py index e007cc87..9cfdee56 100644 --- a/codegen/rename_whl.py +++ b/codegen/rename_whl.py @@ -8,6 +8,7 @@ if len(chunks) == 5: chunks.insert(2, date_tag) new_name = "-".join(chunks) + print(f"Renaming {name} to {new_name}...") os.rename(name, new_name) for name in glob.glob("dist/*.tar.gz"): @@ -15,4 +16,5 @@ if len(chunks) == 5: chunks[2] = f"{chunks[2]}-{date_tag}" new_name = ".".join(chunks) + print(f"Renaming {name} to {new_name}...") os.rename(name, new_name) diff --git a/tests/smoketest.py b/tests/smoketest.py new file mode 100644 index 00000000..b7002de1 --- /dev/null +++ b/tests/smoketest.py @@ -0,0 +1,50 @@ +# version +# ADR service core +from ansys.dynamicreporting.core import Item, Report, Service, __version__ + +# ADR serverless core +from ansys.dynamicreporting.core.serverless import ( + ADR, + HTML, + Animation, + BasicLayout, + BoxLayout, + CarouselLayout, + DataFilterLayout, + Dataset, + File, + FooterLayout, + HeaderLayout, + Image, +) +from ansys.dynamicreporting.core.serverless import ( + ItemsComparisonGenerator, + IteratorGenerator, + IteratorLayout, + PanelLayout, + PPTXLayout, + PPTXSlideLayout, + ReportLinkLayout, + Scene, + Session, + SliderLayout, + SQLQueryGenerator, + StatisticalGenerator, + String, + TabLayout, + Table, + TableMergeGenerator, + TableMergeRCFilterGenerator, + TableMergeValueFilterGenerator, + TableReduceGenerator, + TableSortFilterGenerator, + TagPropertyLayout, + Template, + TOCLayout, + Tree, + TreeMergeGenerator, + UserDefinedLayout, +) +from ansys.dynamicreporting.core.serverless import Item as ServerlessItem + +print(__version__)