-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.14 KB
/
test_python.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Test Python
on:
push:
branches:
- main
jobs:
build_sdist:
if: ${{ !startsWith(github.event.head_commit.message, '[doc]') }}
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- run: pipx run build --sdist
working-directory: python
- uses: actions/upload-artifact@v3
with:
name: undr-sdist
path: python/dist/*.tar.gz
import_library:
name: Import library on ${{ matrix.os }} with Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
needs: [build_sdist]
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- uses: actions/download-artifact@v3
with:
name: undr-sdist
path: dist
- run: python -m pip install dist/*.tar.gz
shell: bash
- run: python -c 'import undr'