Try integration #33
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: Python Test | |
on: | |
push | |
jobs: | |
test-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Py-prep | |
run: make py-prep | |
- name: Check Format | |
run: uvx ruff format --check | |
- name: Lint | |
run: uvx ruff check --fix sematic | |
- name: MyPy | |
run: uv run mypy -p sematic --disable-error-code import-untyped | |
- name: Test | |
run: | | |
source .venv/bin/activate | |
pytest | |
- name: Check Schemas | |
run: git checkout . && make migrate_up_sqlite && make update-schema && git diff --exit-code | |
- name: Wheel | |
run: | | |
make ui | |
make uv-wheel | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: sematic-wheel | |
path: "./dist/sematic-*.whl" | |
retention-days: 10 | |
- uses: actions/upload-artifact@v4 | |
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" | |
integration-test: | |
needs: test-python | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: sematic-wheel | |
path: "./dist" | |
- name: Install Wheel | |
run: "pip install ./dist/*sematic*.whl" | |
- name: Run integration tests | |
run: | | |
cd ./sematic/ui | |
sematic start | |
sematic run examples/add | |
npm run cypress:e2e | |
sematic stop | |
cd - | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cypress-video | |
path: "sematic/ui/tests/cypress_video" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cypress-screenshots | |
path: "sematic/ui/tests/cypress_screenshots" | |
retention-days: 1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cypress-results | |
path: "sematic/ui/tests/cypress_results" | |
retention-days: 1 |