Skip to content

fix: python version installation with rye #4

fix: python version installation with rye

fix: python version installation with rye #4

Workflow file for this run

# .github/workflows/ci-backend.yml
name: CI Backend
on:
push:
paths:
- 'backend/**'
- '.github/workflows/**'
pull_request:
paths:
- 'backend/**'
- '.github/workflows/**'
jobs:
build-and-test:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.12]
steps:
# Step 1: Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v3
# Step 2: Install Rye
- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | RYE_INSTALL_OPTION="--yes" bash
echo "$HOME/.local/bin" >> $GITHUB_PATH # Add Rye to PATH
# Step 3: Install dependencies using Rye
- name: Install Dependencies with Rye
working-directory: backend
run: |
rye sync
# Step 4: Run Tests with Pytest using Rye
- name: Run Pytest
working-directory: backend
run: |
rye run pytest --cov=api --cov=tests --cov-report=xml