2626 os :
2727 - " ubuntu-latest"
2828 - " windows-latest"
29+ - " macos-13"
2930 - " macos-14"
3031 - " macos-15"
3132 # Ref: https://docs.github.com/en/actions/how-tos/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job
@@ -46,13 +47,54 @@ jobs:
4647 with :
4748 python-version : ${{ matrix.python-version }}
4849 cache : ' poetry'
49- - name : Install dependencies
50+
51+ # Dependency and building tests
52+ - name : Install main dependencies
53+ run : |
54+ poetry install --no-root --no-interaction
55+ - name : Check no top-level optional dependencies
56+ run : |
57+ poetry run python scripts/check_dependencies.py
58+ - name : Build sdist and wheel
59+ run : poetry build
60+ - name : Test wheel installation on Windows
61+ if : startsWith(matrix.os, 'windows')
62+ run : |
63+ Get-ChildItem dist/*.whl | ForEach-Object { pip install $_.FullName }
64+ pip uninstall -y memoryos
65+ - name : Test wheel installation on Linux / Mac
66+ if : ${{ !startsWith(matrix.os, 'windows') }}
67+ run : |
68+ pip install dist/*.whl
69+ pip uninstall -y memoryos
70+ - name : Test sdist installation on Windows
71+ if : startsWith(matrix.os, 'windows')
5072 run : |
51- poetry install --no-interaction --with dev --with test
52- - name : Test with ruff
73+ Get-ChildItem dist/*.tar.gz | ForEach-Object { pip install $_.FullName }
74+ pip uninstall -y memoryos
75+ - name : Test sdist installation on Linux / Mac
76+ if : ${{ !startsWith(matrix.os, 'windows') }}
77+ run : |
78+ pip install dist/*.tar.gz
79+ pip uninstall -y memoryos
80+
81+ # Ruff checks
82+ - name : Install test group dependencies
83+ run : |
84+ poetry install --no-interaction --with test
85+ - name : Ruff checks
5386 run : |
5487 poetry run ruff check
5588 poetry run ruff format --check
56- - name : Test with pytest
89+
90+ # PyTest checks
91+ - name : Install all extra dependencies
92+ # macos-13 doesn't support torch==2.7.1
93+ # So, pytest won't work
94+ if : ${{ !startsWith(matrix.os, 'macos-13') }}
95+ run : |
96+ poetry install --no-interaction --extras all
97+ - name : PyTest unit tests
98+ if : ${{ !startsWith(matrix.os, 'macos-13') }}
5799 run : |
58- poetry run pytest tests -vv
100+ poetry run pytest tests -vv --durations=10
0 commit comments