name: CI on: push: branches: - main - develop pull_request: branches: - main - develop concurrency: group: ${{ github.workflow }}-${{ github.ref }} 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.11' - uses: pre-commit/action@v3.0.1 test: runs-on: ${{ matrix.os }} timeout-minutes: 15 needs: lint strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.11", "3.13"] steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: "pip" - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install .[dev] - name: Check ONNX Runtime providers run: | python -c "import onnxruntime as ort; print('Available providers:', ort.get_available_providers())" - name: Run tests run: pytest -v --tb=short - name: Test package imports run: python -c "import uniface; print(f'uniface {uniface.__version__} loaded with {len(uniface.__all__)} exports')" build: runs-on: ubuntu-latest timeout-minutes: 10 needs: test steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.11" cache: "pip" - name: Install build tools run: | python -m pip install --upgrade pip python -m pip install build - name: Build package run: python -m build - name: Check package run: | python -m pip install twine twine check dist/* - name: Upload build artifacts uses: actions/upload-artifact@v4 with: name: dist-python-${{ github.sha }} path: dist/ retention-days: 7