diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 5e3b6dd..ef978e9 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -4,21 +4,15 @@ on: [push] jobs: build: - runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] - + environment: [py311, py312] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - uses: prefix-dev/setup-pixi@v0.5.1 with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt + pixi-version: v0.13.0 + environments: ${{ matrix.environment }} - name: Run tests - run: pytest -vsl --cov=ragger_duck --cov-report term-missing ragger_duck + run: pixi run test diff --git a/pixi.toml b/pixi.toml index d35efc4..e5d94c6 100644 --- a/pixi.toml +++ b/pixi.toml @@ -60,6 +60,18 @@ sentence-transformers = "2.3.1" start-ragger-duck = { cmd = "DEVICE=cpu uvicorn main:app --reload --host 0.0.0.0 --port 8123", cwd = "app" } train-retrievers = { cmd = "DEVICE=cpu python train_retrievers.py", cwd = "scripts" } +[feature.py309.dependencies] +python = "3.9.*" + +[feature.py310.dependencies] +python = "3.10.*" + +[feature.py311.dependencies] +python = "3.11.*" + [environments] cpu = ["cpu"] mps = ["mps"] +py309 = ["py309", "cpu"] +py310 = ["py310", "cpu"] +py311 = ["py311", "cpu"]