Skip to content

Commit

Permalink
FIX: pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgepiloto committed Jul 27, 2023
1 parent f21637b commit 69b11fd
Showing 1 changed file with 33 additions and 26 deletions.
59 changes: 33 additions & 26 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,27 @@ concurrency:
cancel-in-progress: true

jobs:
style:
name: Code style

code-style:
name: "Code style"
runs-on: ubuntu-latest
steps:
- name: PyAnsys code style checks
uses: ansys/actions/code-style@v4
- uses: ansys/actions/code-style@v4
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

docs-style:
name: Documentation Style Check
doc-style:
name: "Doc style"
runs-on: ubuntu-latest
steps:
- name: PyAnsys documentation style checks
uses: ansys/actions/doc-style@v4
- uses: ansys/actions/doc-style@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

smoke-tests:
name: Build and Smoke tests
name: "Wheelhouse for ${{ matrix.os }} and {{ matrix.python-version }}"
runs-on: ${{ matrix.os }}
needs: [style]
needs: code-style
strategy:
fail-fast: false
matrix:
Expand All @@ -64,11 +63,20 @@ jobs:
operating-system: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}

build_and_test:
name: Build & test
tests:
name: "Test ${{ matrix.python-version }} with ${{ matrix.os }}"
needs: [smoke-tests]
runs-on: ubuntu-latest

runs-on: ${{ matrix.os }}
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: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand All @@ -85,16 +93,16 @@ jobs:
env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }}
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-version: ${{ matrix.os }}
requires-xvfb: true

- uses: codecov/codecov-action@v3
name: 'Upload coverage to CodeCov'

docs:
name: Build docs
doc:
name: "Doc build"
runs-on: ubuntu-latest
needs: [smoke-tests]
needs: doc-style
steps:
- uses: actions/checkout@v3

Expand All @@ -115,13 +123,12 @@ jobs:
with:
sphinxopts: '-j auto'

package:
name: Package library
needs: [build_and_test, docs]
build-library:
name: "Build library"
needs: [doc, tests]
runs-on: ubuntu-latest
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@v4
- uses: ansys/actions/build-library@v4
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -142,7 +149,7 @@ jobs:
release:
name: Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [package]
needs: build-library
runs-on: ubuntu-latest
steps:
# Upload first to the private PyPi, at least up until we release
Expand All @@ -169,7 +176,7 @@ jobs:
# Deploy release documentation when creating a new tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [package]
needs: release
steps:
- name: "Deploy the stable documentation"
uses: ansys/actions/doc-deploy-stable@v4
Expand All @@ -180,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: [smoke-tests, build_and_test ]
needs: tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 69b11fd

Please sign in to comment.