feat: adopt maturin #1108
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint and test | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/check.yml' | |
- 'mosec/**' | |
- 'src/**' | |
- 'tests/**' | |
- 'examples/**' | |
- 'setup.py' | |
- 'pyproject.toml' | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
- 'requirements/**' | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/check.yml' | |
- 'mosec/**' | |
- 'src/**' | |
- 'tests/**' | |
- 'examples/**' | |
- 'setup.py' | |
- 'pyproject.toml' | |
- 'Cargo.lock' | |
- 'Cargo.toml' | |
- 'requirements/**' | |
merge_group: | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: make install | |
- name: install node for pyright | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: install pyright | |
run: npm install -g pyright | |
- name: Lint | |
run: make lint semantic_lint | |
test: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 20 | |
strategy: | |
max-parallel: 18 | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
os: [ubuntu-latest , macos-13, macos-14] | |
exclude: | |
- python-version: "3.9" | |
os: "macos-14" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
- name: Install components | |
run: | | |
make install | |
- name: Test unit | |
run: | | |
make test_unit | |
- name: Test | |
run: | | |
make test | |
- name: Test shm in Linux | |
# ignore the shm test for Python 3.12 since pyarrow doesn't have py3.12 wheel with version < 12 | |
if: ${{ startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.python-version, '3.12') && !startsWith(matrix.python-version, '3.13') }} | |
run: | | |
docker run --rm -d --name redis -p 6379:6379 redis | |
make test_shm | |
docker stop redis |