|
1 | | -# This workflows will upload a Python Package using Twine when a release is created |
2 | | -# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries |
3 | | - |
4 | | -name: tests |
5 | | - |
6 | | -on: |
7 | | - push: |
8 | | - branches: |
9 | | - - main |
10 | | - - npe2 |
11 | | - tags: |
12 | | - - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 |
13 | | - pull_request: |
14 | | - branches: |
15 | | - - main |
16 | | - - npe2 |
17 | | - workflow_dispatch: |
18 | | - |
19 | | -jobs: |
20 | | - test: |
21 | | - name: ${{ matrix.platform }} py${{ matrix.python-version }} |
22 | | - runs-on: ${{ matrix.platform }} |
23 | | - strategy: |
24 | | - matrix: |
25 | | - platform: [windows-latest, macos-latest] |
26 | | - python-version: [3.8, 3.9] |
27 | | - |
28 | | - steps: |
29 | | - - uses: actions/checkout@v2 |
30 | | - |
31 | | - - name: Set up Python ${{ matrix.python-version }} |
32 | | - uses: actions/setup-python@v2 |
33 | | - with: |
34 | | - python-version: ${{ matrix.python-version }} |
35 | | - |
36 | | - # these libraries enable testing on Qt on linux |
37 | | - - uses: tlambert03/setup-qt-libs@v1 |
38 | | - |
39 | | - # strategy borrowed from vispy for installing opengl libs on windows |
40 | | - - name: Install Windows OpenGL |
41 | | - if: runner.os == 'Windows' |
42 | | - run: | |
43 | | - git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git |
44 | | - powershell gl-ci-helpers/appveyor/install_opengl.ps1 |
45 | | -
|
46 | | - # note: if you need dependencies from conda, considering using |
47 | | - # setup-miniconda: https://github.com/conda-incubator/setup-miniconda |
48 | | - # and |
49 | | - # tox-conda: https://github.com/tox-dev/tox-conda |
50 | | - - name: Install dependencies |
51 | | - run: | |
52 | | - python -m pip install --upgrade pip |
53 | | - python -m pip install setuptools tox tox-gh-actions |
54 | | -
|
55 | | - # this runs the platform-specific tests declared in tox.ini |
56 | | - - name: Test with tox |
57 | | - uses: GabrielBB/xvfb-action@v1 |
58 | | - with: |
59 | | - run: python -m tox |
60 | | - env: |
61 | | - PLATFORM: ${{ matrix.platform }} |
62 | | - |
63 | | - - name: Coverage |
64 | | - uses: codecov/codecov-action@v2 |
65 | | - |
66 | | - deploy: |
67 | | - # this will run when you have tagged a commit, starting with "v*" |
68 | | - # and requires that you have put your twine API key in your |
69 | | - # github secrets (see readme for details) |
70 | | - needs: [test] |
71 | | - runs-on: ubuntu-latest |
72 | | - if: contains(github.ref, 'tags') |
73 | | - steps: |
74 | | - - uses: actions/checkout@v2 |
75 | | - - name: Set up Python |
76 | | - uses: actions/setup-python@v2 |
77 | | - with: |
78 | | - python-version: "3.8" |
79 | | - - name: Install dependencies |
80 | | - run: | |
81 | | - python -m pip install --upgrade pip |
82 | | - pip install -U setuptools setuptools_scm wheel twine build |
83 | | - - name: Build and publish |
84 | | - env: |
85 | | - TWINE_USERNAME: __token__ |
86 | | - TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} |
87 | | - run: | |
88 | | - git tag |
89 | | - python -m build . |
90 | | - twine upload dist/* |
91 | | -
|
| 1 | +## This workflows will upload a Python Package using Twine when a release is created |
| 2 | +## For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries |
| 3 | +# |
| 4 | +#name: tests |
| 5 | +# |
| 6 | +#on: |
| 7 | +# push: |
| 8 | +# branches: |
| 9 | +# - main |
| 10 | +# - npe2 |
| 11 | +# tags: |
| 12 | +# - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 |
| 13 | +# pull_request: |
| 14 | +# branches: |
| 15 | +# - main |
| 16 | +# - npe2 |
| 17 | +# workflow_dispatch: |
| 18 | +# |
| 19 | +#jobs: |
| 20 | +# test: |
| 21 | +# name: ${{ matrix.platform }} py${{ matrix.python-version }} |
| 22 | +# runs-on: ${{ matrix.platform }} |
| 23 | +# strategy: |
| 24 | +# matrix: |
| 25 | +# platform: [windows-latest, macos-latest, ubuntu-latest] |
| 26 | +# python-version: [3.9] |
| 27 | +# |
| 28 | +# steps: |
| 29 | +# - uses: actions/checkout@v2 |
| 30 | +# |
| 31 | +# - name: Set up Python ${{ matrix.python-version }} |
| 32 | +# uses: actions/setup-python@v2 |
| 33 | +# with: |
| 34 | +# python-version: ${{ matrix.python-version }} |
| 35 | +# |
| 36 | +# # these libraries enable testing on Qt on linux |
| 37 | +# - uses: tlambert03/setup-qt-libs@v1 |
| 38 | +# |
| 39 | +# # strategy borrowed from vispy for installing opengl libs on windows |
| 40 | +# - name: Install Windows OpenGL |
| 41 | +# if: runner.os == 'Windows' |
| 42 | +# run: | |
| 43 | +# git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git |
| 44 | +# powershell gl-ci-helpers/appveyor/install_opengl.ps1 |
| 45 | +# |
| 46 | +# # note: if you need dependencies from conda, considering using |
| 47 | +# # setup-miniconda: https://github.com/conda-incubator/setup-miniconda |
| 48 | +# # and |
| 49 | +# # tox-conda: https://github.com/tox-dev/tox-conda |
| 50 | +# - name: Install dependencies |
| 51 | +# run: | |
| 52 | +# python -m pip install --upgrade pip |
| 53 | +# python -m pip install setuptools tox tox-gh-actions |
| 54 | +# |
| 55 | +# # this runs the platform-specific tests declared in tox.ini |
| 56 | +# - name: Test with tox |
| 57 | +# uses: GabrielBB/xvfb-action@v1 |
| 58 | +# with: |
| 59 | +# run: python -m tox |
| 60 | +# env: |
| 61 | +# PLATFORM: ${{ matrix.platform }} |
| 62 | +# |
| 63 | +# - name: Coverage |
| 64 | +# uses: codecov/codecov-action@v2 |
| 65 | +# |
| 66 | +# deploy: |
| 67 | +# # this will run when you have tagged a commit, starting with "v*" |
| 68 | +# # and requires that you have put your twine API key in your |
| 69 | +# # github secrets (see readme for details) |
| 70 | +# needs: [test] |
| 71 | +# runs-on: ubuntu-latest |
| 72 | +# if: contains(github.ref, 'tags') |
| 73 | +# steps: |
| 74 | +# - uses: actions/checkout@v2 |
| 75 | +# - name: Set up Python |
| 76 | +# uses: actions/setup-python@v2 |
| 77 | +# with: |
| 78 | +# python-version: "3.8" |
| 79 | +# - name: Install dependencies |
| 80 | +# run: | |
| 81 | +# python -m pip install --upgrade pip |
| 82 | +# pip install -U setuptools setuptools_scm wheel twine build |
| 83 | +# - name: Build and publish |
| 84 | +# env: |
| 85 | +# TWINE_USERNAME: __token__ |
| 86 | +# TWINE_PASSWORD: ${{ secrets.TWINE_API_KEY }} |
| 87 | +# run: | |
| 88 | +# git tag |
| 89 | +# python -m build . |
| 90 | +# twine upload dist/* |
| 91 | +# |
0 commit comments