Repository: icaros-usc/pyribs (language: python)

Issue:
Remove tox from CI
## Description

<!-- Provide a brief description of the PR's purpose here. -->

tox makes our CI more complicated because we have to write the test commands in a separate `tox.ini` instead of directly in the GitHub Actions workflow file. Furthermore, tox is not really necessary because GitHub Actions provides a clean environment for the tests. Thus, we are removing tox from the CI.

This change may also make our tests slightly faster since we do not create virutal environments with tox.

## Changelog Description

<!-- Please provide a one-line description we can use in the changelog. -->

Remove tox from CI (#142)

## TODO

<!-- Notable points that this PR has either accomplished or will accomplish. -->

- [x] Remove mentions of tox
- [x] Remove tox.ini
- [x] Add test commands directly to GitHub Actions workflow file

## Questions

<!-- Any concerns or points of confusion? -->

## Status

- [x] I have read the guidelines in
      [CONTRIBUTING.md](https://github.com/icaros-usc/pyribs/blob/master/CONTRIBUTING.md).
- [x] I have formatted my code using `yapf`
- [x] I have tested my code by running `pytest`
- [x] I have linted my code with `pylint`
- [x] This PR is ready to go



Discussion / hints:

Fix patch:
diff --git a/HISTORY.md b/HISTORY.md
index 19f7ed24c..27aba426f 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -28,6 +28,7 @@
 - Refactor visualize module into multiple files ({pr}`357`)
 - Add GitHub link roles in documentation ({pr}`361`)
 - Refactor argument validation utilities ({pr}`365`)
+- Use Conda envs in all CI jobs ({pr}`368`)
 
 ## 0.5.2
 


Test patch:
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index eb5417c15..e25df75a8 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -10,6 +10,13 @@ on:
     branches:
       - master
 
+defaults:
+  run:
+    # The default shell must be set like this so that bash will source the
+    # profile, which contains settings initialized by Conda:
+    # https://github.com/marketplace/actions/setup-miniconda#important
+    shell: bash -el {0}
+
 jobs:
   pre-commit:
     runs-on: ubuntu-latest
@@ -19,9 +26,9 @@ jobs:
       SKIP: pylint
     steps:
       - uses: actions/checkout@v4
-      - uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
-          python-version: 3.11
+          python-version: "3.11"
       - name: Install all deps and pylint (to be available to pre-commit)
         run: pip install .[all] pylint
       - uses: pre-commit/action@v3.0.0
@@ -42,12 +49,9 @@ jobs:
     runs-on: ${{ matrix.os }}
     steps:
       - uses: actions/checkout@v4
-      - name: Set up Python ${{ matrix.python-version }}
-        uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
           python-version: ${{ matrix.python-version }}
-      - name: Upgrade pip
-        run: python -m pip install --upgrade pip
       - name: Install core deps
         run: pip install .[dev]
       - name: Test core
@@ -57,12 +61,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - name: Set up Python 3.8
-        uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
           python-version: "3.8"
-      - name: Upgrade pip
-        run: python -m pip install --upgrade pip
       - name: Install core deps
         run: pip install -r pinned_reqs/install.txt .[dev]
       - name: Test core
@@ -80,12 +81,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - name: Set up Python 3.8
-        uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
           python-version: "3.8"
-      - name: Upgrade pip
-        run: python -m pip install --upgrade pip
       - name: Install deps
         run: pip install .[visualize,dev]
       - name: Test coverage
@@ -100,12 +98,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - name: Set up Python 3.8
-        uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
           python-version: "3.8"
-      - name: Upgrade pip
-        run: python -m pip install --upgrade pip
       - name: Install deps
         run: pip install .[visualize,dev]
       - name: Run benchmarks
@@ -122,10 +117,8 @@ jobs:
         with:
           python-version: 3.8
       - name: Install deps
-        shell: bash -el {0}
         run: pip install .[visualize]
       - name: Test Examples
-        shell: bash -el {0}
         run: bash tests/examples.sh
   tutorials:
     runs-on: ubuntu-latest
@@ -136,12 +129,9 @@ jobs:
         run: sudo apt-get remove swig
       # We use Python 3.10 instead of 3.8 here since Google Colab uses 3.10.
       - uses: actions/checkout@v4
-      - name: Set up Python 3.10
-        uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
           python-version: "3.10"
-      - name: Upgrade pip
-        run: python -m pip install --upgrade pip
       - name: Install deps
         run: pip install .[visualize] jupyter nbconvert
       - name: Test Tutorials
@@ -150,12 +140,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - name: Set up Python 3.8
-        uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
           python-version: "3.8"
-      - name: Upgrade pip
-        run: python -m pip install --upgrade pip
       - name: Install deps
         run: pip install .[visualize,dev]
       - name: Build docs
@@ -166,12 +153,9 @@ jobs:
     if: startsWith(github.ref, 'refs/tags')
     steps:
       - uses: actions/checkout@v4
-      - name: Set up Python 3.8
-        uses: actions/setup-python@v4
+      - uses: conda-incubator/setup-miniconda@v2
         with:
           python-version: "3.8"
-      - name: Upgrade pip
-        run: python -m pip install --upgrade pip
       - name: Install dependencies
         run: |
           pip install -e .