| 1 |
name: test |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- "master" |
| 7 |
- "test-me-*" |
| 8 |
|
| 9 |
pull_request: |
| 10 |
branches: |
| 11 |
- "master" |
| 12 |
|
| 13 |
|
| 14 |
concurrency: |
| 15 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 16 |
cancel-in-progress: true |
| 17 |
|
| 18 |
jobs: |
| 19 |
|
| 20 |
package: |
| 21 |
runs-on: ubuntu-latest |
| 22 |
steps: |
| 23 |
- uses: actions/checkout@v5 |
| 24 |
- name: Build and Check Package |
| 25 |
uses: hynek/[email protected] |
| 26 |
|
| 27 |
test: |
| 28 |
|
| 29 |
needs: [package] |
| 30 |
|
| 31 |
runs-on: ${{ matrix.os }} |
| 32 |
|
| 33 |
strategy: |
| 34 |
fail-fast: false |
| 35 |
matrix: |
| 36 |
os: [ windows-latest, ubuntu-latest ] |
| 37 |
python: [ "3.8", "3.10", "3.11", "3.12", "pypy-3.11" ] |
| 38 |
|
| 39 |
steps: |
| 40 |
- uses: actions/checkout@v5 |
| 41 |
with: |
| 42 |
fetch-depth: 0 |
| 43 |
|
| 44 |
- name: Download Package |
| 45 |
uses: actions/download-artifact@v6 |
| 46 |
with: |
| 47 |
name: Packages |
| 48 |
path: dist |
| 49 |
|
| 50 |
- name: Set up Python |
| 51 |
uses: actions/setup-python@v6 |
| 52 |
with: |
| 53 |
python-version: ${{ matrix.python }} |
| 54 |
|
| 55 |
- name: Install dependencies |
| 56 |
run: pip install tox twine |
| 57 |
|
| 58 |
- name: Check package |
| 59 |
shell: bash |
| 60 |
run: | |
| 61 |
twine check --strict dist/* |
| 62 |
|
| 63 |
- name: Test |
| 64 |
shell: bash |
| 65 |
run: | |
| 66 |
tox run -e py --installpkg `find dist/*.tar.gz` |