diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index b1f2f71..083ab1a 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -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: | @@ -41,12 +41,20 @@ 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: | @@ -54,17 +62,17 @@ jobs: 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: @@ -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 \ No newline at end of file + 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 \ No newline at end of file