Skip to content

Merge branch 'main' into augray/matrix-py-test #46

Merge branch 'main' into augray/matrix-py-test

Merge branch 'main' into augray/matrix-py-test #46

Workflow file for this run

name: Python Test
on:
push
jobs:
test-python:
runs-on: ubuntu-latest
strategy:
matrix:
py-version: ["3.9", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Py-prep
run: make py-prep PY_VERSION=${{ matrix.py-version }}
- name: Check Format
run: uvx ruff format --check
- name: Lint
run: uvx ruff check --fix sematic
- name: MyPy
if: matrix.py-version == '3.12'
run: uv run mypy -p sematic --disable-error-code import-untyped
- name: Test
run: |
source .venv/bin/activate
python3 -c "import sys; print(sys.version)"
pytest
- name: Check Schemas
if: matrix.py-version == '3.12'
run: git checkout . && make migrate_up_sqlite && make update-schema && git diff --exit-code
- name: Wheel
if: matrix.py-version == '3.12'
run: |
make ui
make uv-wheel
- uses: actions/upload-artifact@v4
if: matrix.py-version == '3.12'
with:
name: sematic-wheel
path: "./dist/sematic-*.whl"
retention-days: 10
- uses: actions/upload-artifact@v4
if: matrix.py-version == '3.12'
with:
name: sematic-wheel-test
path: "sematic/tests/integration/test_pip_install.sh"
retention-days: 1
test-install:
needs: test-python
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: sematic-wheel
path: "./dist"
- uses: actions/download-artifact@v4
with:
name: sematic-wheel-test
path: "./"
- name: Test and Install Wheel
run: "bash test_pip_install.sh"