mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-07-02 01:05:29 +02:00
try to run tests on windows
This commit is contained in:
@@ -12,26 +12,23 @@ permissions:
|
||||
jobs:
|
||||
test:
|
||||
name: Build & Test
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: [ubuntu-latest, windows-latest]
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set Up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install the latest version of uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
- name: Create venv
|
||||
run: uv venv
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pytest
|
||||
uv sync
|
||||
uv add pytest
|
||||
|
||||
- name: Run unit tests
|
||||
id: unit-tests
|
||||
run: |
|
||||
pip install -r tests/unit_tests/requirements.txt
|
||||
uv pip install -r tests/unit_tests/requirements.txt
|
||||
./run.sh unit-tests -s -vv
|
||||
continue-on-error: true
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ down() {
|
||||
|
||||
unit_tests() {
|
||||
echo "Running unit tests..."
|
||||
PYTHONPATH=. pytest tests/unit_tests $@
|
||||
PYTHONPATH=. uv run pytest tests/unit_tests $@
|
||||
|
||||
TEST_EXIT_CODE=$?
|
||||
echo "Unit tests finished with exit code: $TEST_EXIT_CODE"
|
||||
@@ -142,9 +142,9 @@ integration_tests() {
|
||||
|
||||
# Generate latest whl file for the invariant-gateway package.
|
||||
# This is required to run the integration tests.
|
||||
pip install build
|
||||
uv pip install build
|
||||
rm -rf dist
|
||||
python -m build
|
||||
uv python -m build
|
||||
WHEEL_FILE=$(ls dist/*.whl | head -n 1)
|
||||
echo "WHEEL_FILE: $WHEEL_FILE"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user