Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 32 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, closed]
types: [opened, synchronize, reopened, ready_for_review, closed, labeled]
branches-ignore:
- '*no-ci*'
push:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:

pick_server_suffix:
runs-on: ubuntu-latest
if: github.event.action != 'closed'
if: github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
outputs:
suffix: ${{ steps.step1.outputs.suffix }}
steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
style:
name: "Style Check"
runs-on: ubuntu-latest
if: github.event.action != 'closed'
if: github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
steps:
- uses: ansys/actions/code-style@v8
with:
Expand All @@ -80,7 +80,7 @@ jobs:
build_linux1:
name: "Build linux1 wheel"
runs-on: ubuntu-latest
if: github.event.action != 'closed'
if: github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
matrix:
test-any: ['false', 'true']
uses: ./.github/workflows/tests.yml
if: github.event.action != 'closed'
if: github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
needs: pick_server_suffix
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
Expand All @@ -126,7 +126,7 @@ jobs:
docker_tests:
name: "Build and Test on Docker"
uses: ./.github/workflows/test_docker.yml
if: github.event.action != 'closed'
if: github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
needs: pick_server_suffix
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
Expand All @@ -136,7 +136,7 @@ jobs:
docker_examples:
name: "Run examples on Docker"
uses: ./.github/workflows/examples_docker.yml
if: github.event.action != 'closed'
if: github.event.action != 'closed' && (github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc')
needs: pick_server_suffix
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
Expand All @@ -145,7 +145,10 @@ jobs:
secrets: inherit

docs:
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
if: |
github.event.action != 'closed' &&
(github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
(startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
uses: ./.github/workflows/docs.yml
needs: pick_server_suffix
with:
Expand All @@ -159,7 +162,11 @@ jobs:
name: "Deploy PR documentation"
runs-on: ubuntu-latest
needs: docs
if: always() && (needs.docs.result == 'success' || needs.docs.result == 'skipped')
if: |
always() &&
github.event.pull_request.draft != true &&
(needs.docs.result == 'success' || needs.docs.result == 'skipped') &&
contains(github.event.pull_request.labels.*.name, 'deploy-pr-doc')
steps:
- uses: ansys/actions/doc-deploy-pr@v10
with:
Expand All @@ -173,7 +180,10 @@ jobs:

upload-development-docs:
runs-on: ubuntu-latest
if: ${{ github.event.action != 'closed' && (github.ref == 'refs/heads/master' && github.event_name == 'push') }}
if: |
github.event.action != 'closed' &&
(github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
(github.ref == 'refs/heads/master' && github.event_name == 'push')
needs: [docs]
steps:
- name: "Upload development documentation"
Expand All @@ -187,7 +197,10 @@ jobs:
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}

examples:
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
if: |
github.event.action != 'closed' &&
(github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
(startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
uses: ./.github/workflows/examples.yml
needs: pick_server_suffix
with:
Expand All @@ -198,7 +211,10 @@ jobs:

pydpf-post:
name: "PyDPF-Post"
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
if: |
github.event.action != 'closed' &&
(github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
(startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
uses: ./.github/workflows/pydpf-post.yml
needs: pick_server_suffix
with:
Expand All @@ -210,7 +226,10 @@ jobs:

tests-retro:
name: "Test DPF ${{ matrix.dpf.version }} compatibility"
if: github.event.action != 'closed' && (startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
if: |
github.event.action != 'closed' &&
(github.event.action != 'labeled' || github.event.label.name == 'deploy-pr-doc') &&
(startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft)
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
steps:

# Label based on modified files
- name: Label based on changed files
- name: "Label based on changed files"
uses: actions/labeler@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down