Skip to content

Commit

Permalink
fix: update rye path
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan-Kim2028 committed Oct 21, 2024
1 parent 5721bc1 commit 4bf1c8e
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# .github/workflows/ci-backend.yml

name: CI Backend

on:
Expand Down Expand Up @@ -29,15 +27,38 @@ jobs:
- 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
# Step 3: Add Rye to PATH
- name: Add Rye to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
# Step 4: Verify Rye Installation (Optional but recommended)
- name: Verify Rye Installation
run: rye --version

# Step 5: Cache Rye Dependencies (Optional but recommended)
- name: Cache Rye Dependencies
uses: actions/cache@v3
with:
path: ~/.cache/rye
key: ${{ runner.os }}-rye-${{ hashFiles('backend/rye.lock') }}
restore-keys: |
${{ runner.os }}-rye-
# Step 6: Install dependencies using Rye
- name: Install Dependencies with Rye
working-directory: backend
run: |
rye sync
# Step 4: Run Tests with Pytest using Rye
# Step 7: Verify Python and Rye Versions (Optional but recommended)
- name: Verify Python and Rye Versions
run: |
python --version
rye --version
# Step 8: Run Tests with Pytest using Rye
- name: Run Pytest
working-directory: backend
run: |
Expand Down

0 comments on commit 4bf1c8e

Please sign in to comment.