-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds cd_ci routines * Adds dependabot and labeler * Removes wildcard asterisk * Removes wildcard asterisk * Allows upper or lower case in regular expression * Allows upper or lower case in regular expression * Changes test output to adapt for pytest-plugin outputs * Changes test output to adapt for pytest-plugin outputs * Changes test output to adapt for pytest-plugin outputs * Changes test output to adapt for pytest-plugin outputs * Working on the CD/CI * Move plugin to its own folder to fix coverage report * Move plugin to its own folder to fix coverage report * Fix typo * Uses regex for wheel name * Changes software report to pytest-pyvista * Apply suggestions from code review Co-authored-by: Maxime Rey <[email protected]> * Explains entry_point variable Co-authored-by: Maxime Rey <[email protected]>
- Loading branch information
1 parent
1971196
commit eafb8fb
Showing
8 changed files
with
218 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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,17 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "pip" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
insecure-external-code-execution: allow | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "maintenance" | ||
- "dependencies" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "maintenance" | ||
- "dependencies" |
This file contains 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,18 @@ | ||
documentation: | ||
- doc/**/* | ||
- examples/**/* | ||
- ./*.md | ||
- ./*.rst | ||
maintenance: | ||
- .github/**/* | ||
- codecov.yml | ||
- .flake8 | ||
- .coveragerc | ||
- .codecimate.yml | ||
- ignore_words.txt | ||
- mypy.ini | ||
- pyproject.toml | ||
- setup.py | ||
dependencies: | ||
- requirements* | ||
- environment.yml |
This file contains 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,122 @@ | ||
name: Unit Testing and Deployment | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
ALLOW_PLOTTING: true | ||
SHELLOPTS: 'errexit:pipefail' | ||
|
||
jobs: | ||
Linux: | ||
name: Linux Unit Testing | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
include: | ||
- python-version: '3.7' | ||
vtk-version: '8.1.2' | ||
- python-version: '3.8' | ||
vtk-version: '9.0.3' | ||
- python-version: '3.9' | ||
vtk-version: '9.1' | ||
- python-version: '3.10' | ||
vtk-version: 'latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: requirements_test.txt | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.local/share/pytest-pyvista/examples | ||
key: Examples-1-${{ hashFiles('*') }} | ||
restore-keys: | | ||
Examples-1- | ||
- name: Build wheel and install pytest-pyvista | ||
run: | | ||
pip install wheel | ||
python setup.py bdist_wheel | ||
pip install dist/pytest_pyvista*.whl | ||
- name: Set up vtk | ||
if: ${{ matrix.vtk-version != 'latest' }} | ||
run: pip install vtk==${{ matrix.vtk-version }} | ||
|
||
- uses: awalsh128/[email protected] | ||
with: | ||
packages: libgl1-mesa-glx xvfb python-tk | ||
version: 3.0 | ||
|
||
- name: Install Testing Requirements | ||
run: pip install -r requirements_test.txt | ||
|
||
- name: Software Report | ||
run: | | ||
xvfb-run python -c "import pytest_pyvista; pytest_pyvista" | ||
which python | ||
pip list | ||
- name: Unit Testing | ||
run: xvfb-run coverage run -m --source=pytest_pyvista --module pytest --verbose . | ||
- uses: codecov/codecov-action@v3 | ||
if: matrix.python-version == '3.9' | ||
name: 'Upload coverage to CodeCov' | ||
|
||
release: | ||
name: Release | ||
if: | | ||
github.event_name == 'push' && | ||
contains(github.ref, 'refs/tags') && | ||
github.event.workflow_run.conclusion == 'success' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip build twine | ||
- name: Build artifacts | ||
run: | | ||
python -m build && python -m twine check dist/* | ||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
python -m twine upload --skip-existing ./**/*.whl | ||
python -m twine upload --skip-existing ./**/*.tar.gz | ||
- name: Publish to GitHub | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
./**/*.whl | ||
./**/*.tar.gz |
This file contains 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,49 @@ | ||
name: "Pull Request Labeler" | ||
on: | ||
pull_request_target: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Label based on changed files | ||
uses: actions/labeler@v4 | ||
with: | ||
repo-token: "${{ secrets.GITHUB_TOKEN }}" | ||
# https://github.com/actions/labeler/issues/112#issuecomment-1000491676 | ||
sync-labels: '' | ||
|
||
# Label based on branch name | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'doc/') || startsWith(github.event.pull_request.head.ref, 'docs') | ||
with: | ||
labels: documentation | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'docker') | ||
with: | ||
labels: docker | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'maint') || startsWith(github.event.pull_request.head.ref, 'no-ci') || startsWith(github.event.pull_request.head.ref, 'ci') | ||
with: | ||
labels: maintenance | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'junk') | ||
with: | ||
labels: ignore-for-release | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'feat') | ||
with: | ||
labels: enhancement | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'fix') || startsWith(github.event.pull_request.head.ref, 'patch') | ||
with: | ||
labels: bug | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'release') | ||
with: | ||
labels: release | ||
- uses: actions-ecosystem/action-add-labels@v1 | ||
if: startsWith(github.event.pull_request.head.ref, 'breaking-change') | ||
with: | ||
labels: breaking-change |
File renamed without changes.
This file contains 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,5 @@ | ||
codecov<2.2.0 | ||
coverage==6.5 | ||
pytest>=3.5.0 | ||
pytest-cov==4.0.0 | ||
pyvista==0.37 |
This file contains 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
This file contains 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