Skip to content

lint and test

lint and test #791

Workflow file for this run

name: lint and test
on:
pull_request:
paths:
- '.github/workflows/check.yml'
- 'mosec/**'
- 'src/**'
- 'tests/**'
- 'examples/**'
- 'setup.py'
- 'Cargo.lock'
- 'Cargo.toml'
- 'requirements/**'
push:
branches:
- main
paths:
- '.github/workflows/check.yml'
- 'mosec/**'
- 'src/**'
- 'tests/**'
- 'examples/**'
- 'setup.py'
- '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@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: make install
- name: install node for pyright
uses: actions/setup-node@v3
with:
node-version: 18
- name: install pyright
# due to https://github.com/microsoft/pyright/issues/5126
run: npm install -g pyright
- name: Lint
run: make lint
test:
runs-on: ${{ matrix.os }}
needs: [lint]
timeout-minutes: 20
strategy:
max-parallel: 10
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
os: [ubuntu-latest , macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: ./.github/actions/cache
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev,mixin]
make dev
- name: Test
run: |
make semantic_lint test
- name: Test pyarrow in Linux
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update && sudo apt install redis
make test_shm