From 8b74af3159882a873b5886333a4dd9afecef9076 Mon Sep 17 00:00:00 2001 From: Ben Jourdan Date: Sat, 12 Oct 2024 10:48:23 +0000 Subject: [PATCH] removing virtual env from CI --- .github/workflows/CI.yml | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d62b7af..bad7b94 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -36,15 +36,7 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - # Step 4: Set up and activate virtual environment - - name: Set up and activate virtual environment - id: activate-venv - run: | - python -m venv venv - source venv/bin/activate || .\venv\Scripts\activate - shell: bash - - # Step 5: Install dependencies (including maturin and project dependencies) + # Step 4: Install dependencies (including maturin and project dependencies) - name: Install dependencies run: | pip install --upgrade pip @@ -52,30 +44,27 @@ jobs: pip install -r requirements.txt shell: bash - # Step 6: Run Ruff linter and fail on any issues + # Step 5: Run Ruff linter and fail on any issues - name: Run Ruff (Python linter) run: | ruff check . shell: bash - # Step 7: Run Black formatter + # Step 6: Run Black formatter - name: Run Black (Python formatter) run: | black --check . shell: bash - # Step 8: Build and install the Rust library using Maturin (in release mode) + # Step 7: Build and install the Rust library using Maturin (in release mode) - name: Build and install Rust library (release mode) run: | - source venv/bin/activate || .\venv\Scripts\activate - ./venv/bin/python -m maturin develop --release - python -c "import coreset_sc; print(coreset_sc.__file__)" + maturin develop --release # Build the Rust library and install it globally shell: bash - # Step 9: Run Python tests with pytest + # Step 8: Run Python tests with pytest - name: Run Python tests with pytest run: | - source venv/bin/activate || .\venv\Scripts\activate pytest tests/ # Run tests shell: bash @@ -94,29 +83,21 @@ jobs: with: python-version: '3.10' # Just need a single Python version to build docs - # Step 3: Set up and activate virtual environment for Sphinx - - name: Set up and activate virtual environment - run: | - python -m venv venv - source venv/bin/activate || .\venv\Scripts\activate - shell: bash - - # Step 4: Install dependencies for docs + # Step 3: Install dependencies for docs - name: Install dependencies for docs run: | pip install --upgrade pip pip install -r requirements.txt shell: bash - # Step 5: Build Sphinx documentation + # Step 4: Build Sphinx documentation - name: Build Sphinx documentation run: | - source venv/bin/activate || .\venv\Scripts\activate # Activate virtual environment cd docs make html shell: bash - # Step 6: Deploy to GitHub Pages + # Step 5: Deploy to GitHub Pages - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: