Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 39 additions & 23 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ on:

jobs:
run_unix_tests:
env:
UV_SYSTEM_PYTHON: 1

name: Run Python tests on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install Clang
run: |
Expand All @@ -41,30 +41,38 @@ jobs:
./get_sources
working-directory: ./package

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: '3.9'

- name: Set up Python
run: uv python install

- name: Install NucleoFind
run: pip install .
run: uv pip install . --break-system-packages
working-directory: ./package

- name: Install pytest
run: pip install pytest
run: uv pip install pytest --break-system-packages

- name: Install NucleoFind models
run: |
nucleofind-install -m core
nucleofind-install -m nano

- name: Run tests
run : pytest tests
run: uv run pytest tests
working-directory: ./package

run_windows_tests:
name: Run Python tests on Windows
runs-on: windows-latest
env:
UV_SYSTEM_PYTHON: 1

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.9'

- uses: TheMrMilchmann/setup-msvc-dev@v3
with:
Expand All @@ -76,31 +84,39 @@ jobs:
sh get_sources
working-directory: ./package

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: '3.9'

- name: Set up Python
run: uv python install

- name: Install NucleoFind
run: pip install .
run: uv pip install . --break-system-packages
working-directory: ./package

- name: Install pytest
run: pip install pytest
run: uv pip install pytest

- name: Install NucleoFind models
run: |
run: |
nucleofind-install -m nano
nucleofind-install -m core

- name: Run tests
run : pytest tests
run: uv run pytest tests --break-system-packages
working-directory: ./package


debug:
needs: [run_unix_tests, run_windows_tests]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- uses: actions/checkout@v3
- name: Notify chat
uses: teknatha136/actions-google-chat-text-message@main
with:
google-chat-webhook: ${{ secrets.WEBHOOK_URL }}
text-message: ${{ github.actor }} attempted to merge a change into NucleoFind, but this PR failed testing. Link ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \n
needs: [ run_unix_tests, run_windows_tests ]
runs-on: ubuntu-latest
if: ${{ failure() }}
steps:
- uses: actions/checkout@v3
- name: Notify chat
uses: teknatha136/actions-google-chat-text-message@main
with:
google-chat-webhook: ${{ secrets.WEBHOOK_URL }}
text-message: ${{ github.actor }} attempted to merge a change into NucleoFind, but this PR failed testing. Link ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \n
Loading