-
Notifications
You must be signed in to change notification settings - Fork 5
92 lines (82 loc) · 2.77 KB
/
test.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Test
on:
pull_request:
types: [opened, synchronize]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
architecture:
- x64
os:
- macos-latest-large
- ubuntu-latest
- windows-latest
python:
- "3.12"
include:
- architecture: aarch64
os: macos-latest-xlarge
python: "3.12"
- architecture: x64
os: ubuntu-latest
python: "3.11"
- architecture: x64
os: ubuntu-latest
python: "3.10"
- architecture: x64
os: ubuntu-latest
python: "3.9"
fail-fast: false
name: Test on ${{ matrix.os }}-${{ matrix.architecture }} with Python ${{ matrix.python }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/build-jdk
with:
architecture: ${{ matrix.architecture }}
python-version: ${{ matrix.python }}
- uses: ./.github/actions/create-python-wheel
with:
build-number: ${{ env.JDK4PY_BUILD_NUMBER }}
# The library's Python wheels are not tied to a specific version of Python so there is no need to upload the package for each Python version.
- if: ${{ matrix.python == '3.12' }}
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: jdk4py-${{ matrix.os }}-${{ matrix.architecture }}.whl
path: dist/jdk4py-*.whl
# No need to do that for each OS and Python version.
- if: ${{ matrix.os == 'ubuntu-latest' && matrix.python == '3.12' }}
name: Check formatting, linting, and types
run: poetry run ruff format --check . && poetry run ruff check . && poetry run mypy --show-error-codes jdk4py scripts tests
- run: poetry run pytest
conda-package:
runs-on: ${{ matrix.os }}
strategy:
matrix:
architecture:
- x64
os:
- macos-latest-large
- ubuntu-latest
- windows-latest
include:
- architecture: aarch64
os: macos-latest-xlarge
name: Test Conda packaging on ${{ matrix.os }}-${{ matrix.architecture }}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/build-jdk
with:
architecture: ${{ matrix.architecture }}
# No need to test for each Python version.
python-version: "3.12"
- uses: ./.github/actions/create-conda-package
with:
architecture: ${{ matrix.architecture }}
- uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: jdk4py-${{ matrix.os }}-${{ matrix.architecture }}-conda-packages
path: dist/${{ env.JDK4PY_CONDA_PLATFORM }}/jdk4py-*.tar.bz2