Spaces:
Running
Running
name: test | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
enable-cache: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
eval `ssh-agent -s` | |
ssh-add - <<< '${{ secrets.LYNXSCRIBE_DEPLOY_KEY }}' | |
uv pip install \ | |
-e lynxkite-core/[dev] \ | |
-e lynxkite-app/[dev] \ | |
-e lynxkite-graph-analytics/[dev] \ | |
-e lynxkite-bio \ | |
-e lynxkite-lynxscribe/ \ | |
-e lynxkite-pillow-example/ | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
- name: Run pre-commits | |
run: | | |
uv pip install pre-commit | |
pre-commit run --all-files | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
- name: Run core tests | |
run: | | |
cd lynxkite-core | |
pytest | |
- name: Run app tests | |
run: | | |
cd lynxkite-app | |
pytest | |
- name: Run graph analytics tests | |
run: | | |
cd lynxkite-graph-analytics | |
pytest | |
- name: Run LynxScribe tests | |
run: | | |
cd lynxkite-lynxscribe | |
pytest | |
- name: Try building the documentation | |
run: | | |
uv pip install mkdocs-material mkdocstrings[python] | |
mkdocs build | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install frontend dependencies | |
run: | | |
cd lynxkite-app/web | |
npm i | |
npx playwright install --with-deps | |
- name: Run Playwright tests | |
run: | | |
cd lynxkite-app/web | |
npm run test | |
- uses: actions/upload-artifact@v4 | |
name: Upload playwright report | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: lynxkite-app/web/playwright-report/ | |
retention-days: 30 | |