-
Notifications
You must be signed in to change notification settings - Fork 0
ci: split logic into multiple workflows #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8e6a646
ci: split ci logic into multiple workflows
SMoraisAnsys 49354d0
chore: adding changelog file 28.miscellaneous.md [dependabot-skip]
pyansys-ci-bot 0ec2116
fix: permission issue
SMoraisAnsys b77c81d
fix: permission issue
SMoraisAnsys e35ec17
Merge branch 'main' into ci/splot-ci-into-multiple-workflows
AlejandroFernandezLuces 44cc727
ci: fix permissions
SMoraisAnsys 032aabc
Merge branch 'main' into ci/splot-ci-into-multiple-workflows
AlejandroFernandezLuces File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: CI - Main | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| env: | ||
| DOCUMENTATION_CNAME: usd-viewer.docs.pyansys.com | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
|
|
||
| doc-build: | ||
| name: Building library documentation | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Run Ansys documentation building action | ||
| uses: ansys/actions/doc-build@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| group-dependencies-name: "doc" | ||
| check-links: false | ||
|
|
||
| doc-deploy-dev: | ||
| name: Deploy development documentation | ||
| runs-on: ubuntu-latest | ||
| needs: [doc-build] | ||
| permissions: | ||
| contents: write # Needed to update files on the gh-pages branch | ||
| pull-requests: write # Needed to add comments to the PR when cleaning pull directory | ||
| steps: | ||
| - uses: ansys/actions/doc-deploy-dev@main | ||
| with: | ||
| cname: ${{ env.DOCUMENTATION_CNAME }} | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | ||
| bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,228 @@ | ||
| name: CI - PR | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize, edited, labeled] | ||
|
|
||
| env: | ||
| PACKAGE_NAME: ansys-tools-usdviewer | ||
| MAIN_PYTHON_VERSION: 3.13 | ||
| DOCUMENTATION_CNAME: usd-viewer.docs.pyansys.com | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
|
|
||
| pr-name: | ||
| name: Check the name of the PR | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pull-requests: read # Required to read PR metadata | ||
| steps: | ||
| - name: Check commit name | ||
| uses: ansys/actions/check-pr-title@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| changelog: | ||
| name: Changelog | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write # Required for the changelog | ||
| pull-requests: write # Required for the changelog | ||
| steps: | ||
| - name: Create fragment | ||
| uses: ansys/actions/doc-changelog@21c9de9bee9692173780696d4a39964f20b9cfa3 # v10.1.5 | ||
| with: | ||
| token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | ||
| bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | ||
| bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} | ||
|
|
||
| labeler: | ||
| name: Labels | ||
| permissions: | ||
| contents: read # Needed to read existing labels on the repository | ||
| pull-requests: write # Needed to add existing labels to PRs | ||
| issues: write # Needed to create labels that do not already exist | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout project | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Sync labels | ||
| uses: micnncim/action-label-syncer@3abd5ab72fda571e69fffd97bd4e0033dd5f495c # v1.3.0 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Label pull-request | ||
| # HACK: skip if contributor does not have write permissions (forks) | ||
| if: github.event.pull_request.head.repo.full_name == github.repository | ||
| uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1 | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| sync-labels: true | ||
|
|
||
| # NOTE: added for PRs from external contributors | ||
| commenter: | ||
| name: Suggest labels if none assigned | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read # needed to read existing labels on the pull request | ||
| pull-requests: write # needed for comment action | ||
| steps: | ||
| - name: Suggest to add labels | ||
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5.0.0 | ||
| # Execute only when no labels have been applied to the pull request | ||
| if: toJSON(github.event.pull_request.labels.*.name) == '{}' | ||
| with: | ||
| issue-number: ${{ github.event.pull_request.number }} | ||
| body: | | ||
| Please add one of the following labels to add this contribution to the Release Notes :point_down: | ||
| - [bug](https://github.com/ansys/python-usd-viewer/pulls?q=label%3Abug+) | ||
| - [documentation](https://github.com/ansys/python-usd-viewer/pulls?q=label%3Adocumentation+) | ||
| - [enhancement](https://github.com/ansys/python-usd-viewer/pulls?q=label%3Aenhancement+) | ||
| - [good first issue](https://github.com/ansys/python-usd-viewer/pulls?q=label%3Agood+first+issue) | ||
| - [maintenance](https://github.com/ansys/python-usd-viewer/pulls?q=label%3Amaintenance+) | ||
| - [release](https://github.com/ansys/python-usd-viewer/pulls?q=label%3Arelease+) | ||
|
|
||
| # vulnerabilities: | ||
| # name: Vulnerabilities | ||
| # runs-on: ubuntu-latest | ||
| # steps: | ||
| # - name: PyAnsys Vulnerability check (on main) | ||
| # if: github.ref == 'refs/heads/main' | ||
| # uses: ansys/actions/check-vulnerabilities@41f86da4c9ead510db9135e428e33df9cc6f92e1 # v10.2.3 | ||
| # with: | ||
| # python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
| # python-package-name: ${{ env.PACKAGE_NAME }} | ||
| # token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | ||
| # upload-reports: true | ||
|
|
||
| # - name: PyAnsys Vulnerability check (on dev mode) | ||
| # if: github.ref != 'refs/heads/main' | ||
| # uses: ansys/actions/check-vulnerabilities@41f86da4c9ead510db9135e428e33df9cc6f92e1 # v10.2.3 | ||
| # with: | ||
| # python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
| # python-package-name: ${{ env.PACKAGE_NAME }} | ||
| # token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | ||
| # dev-mode: true | ||
| # upload-reports: true | ||
| # hide-log: false | ||
|
|
||
| code-style: | ||
| name: Code style | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: ansys/actions/code-style@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
|
||
| doc-style: | ||
| name: Doc style | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: ansys/actions/doc-style@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| actions-style: | ||
| name: Actions style | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: ansys/actions/check-actions-security@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| generate-summary: true | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| auditing-level: high | ||
|
|
||
| wheelhouse: | ||
| name: Wheelhouse / ${{ matrix.os }} / ${{ matrix.python }} | ||
| runs-on: ${{ matrix.os }} | ||
| needs: code-style | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
| python: ['3.10', '3.11', '3.12', '3.13'] | ||
| steps: | ||
| - uses: ansys/actions/build-wheelhouse@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| library-name: ${{ env.PACKAGE_NAME }} | ||
| operating-system: ${{ matrix.os }} | ||
| python-version: ${{ matrix.python }} | ||
| whitelist-license-check: 'PySide6, PySide6_Addons, PySide6_Essentials, shiboken6' | ||
|
|
||
| doc-build: | ||
| name: Building library documentation | ||
| runs-on: ubuntu-latest | ||
| needs: doc-style | ||
| steps: | ||
| - name: Run Ansys documentation building action | ||
| uses: ansys/actions/doc-build@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| group-dependencies-name: "doc" | ||
| check-links: false | ||
|
|
||
| tests: | ||
| name: Tests | ||
| runs-on: ubuntu-latest | ||
| needs: code-style | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Python | ||
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | ||
| with: | ||
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
|
||
| - name: Set up uv | ||
| uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0 | ||
| with: | ||
| enable-cache: false | ||
|
|
||
| - name: Install python-usd-viewer and tests dependencies | ||
| run: uv sync --no-dev --group tests --frozen | ||
|
|
||
| - name: Run tests | ||
| run: uv run pytest tests | ||
|
|
||
| build-library: | ||
| name: Build library | ||
| runs-on: ubuntu-latest | ||
| needs: [wheelhouse] | ||
| steps: | ||
| - uses: ansys/actions/build-library@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| library-name: ${{ env.PACKAGE_NAME }} | ||
| python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
|
||
| automerge-prs: | ||
| name: Automerge PRs (dependabot and pre-commit.ci only) | ||
| runs-on: ubuntu-latest | ||
| needs: [build-library, tests] | ||
| permissions: | ||
| contents: write # needed for automerge action | ||
| pull-requests: write # needed for automerge action | ||
| steps: | ||
| - name: Automerge PRs | ||
| uses: ansys/actions/hk-automerge-prs@3931ac9351b13ae11b1203c2ef6b51e5c75502ea # v10.2.5 | ||
| with: | ||
| approver: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | ||
| approver-token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | ||
|
|
||
| - name: If pre-commit PR, add assignee | ||
| if: startsWith(github.head_ref, 'pre-commit-ci-update-config') | ||
| run: gh pr edit --add-assignee pyansys-ci-bot "$PR_URL" | ||
| env: | ||
| PR_URL: ${{github.event.pull_request.html_url}} | ||
| GH_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.