diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84a63d78..cc19e476 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,9 +120,7 @@ jobs: steps: - name: Install Git - if: matrix.clang == 10 - run: | - apt-get update && apt-get install -y git --no-install-recommends + run: apt-get update && apt-get install -y git --no-install-recommends # Work-around for https://github.com/actions/runner-images/issues/6775 - name: Change Owner of Container Working Directory @@ -138,27 +136,34 @@ jobs: - name: Prepare env run: > - apt-get update && apt-get install -y python3-dev python3-pip python3-setuptools python3-wheel - python3-numpy python3-scipy python3-matplotlib python3-requests python3-networkx + apt-get update && apt-get install -y python3-dev python3-full python3-pip python3-setuptools + python3-wheel python3-numpy python3-scipy python3-matplotlib python3-requests python3-networkx python3-pytest python3-pytest-cov python3-flaky libomp-dev --no-install-recommends - name: Prepare Python env run: | + python3 -m venv venv + . venv/bin/activate python3 -m pip install -U pip setuptools wheel python3 setup.py gen_reqfile --include-extras=test,azure-quantum,braket cat requirements.txt python3 -m pip install -r requirements.txt --prefer-binary - name: Upgrade pybind11 and flaky - run: python3 -m pip install --upgrade pybind11 flaky --prefer-binary + run: | + . venv/bin/activate + python3 -m pip install --upgrade pybind11 flaky --prefer-binary - name: Build and install package - run: python3 -m pip install -ve .[azure-quantum,braket,test] + run: | + . venv/bin/activate + python3 -m pip install -ve .[azure-quantum,braket,test] - name: Pytest run: | + . venv/bin/activate echo 'backend: Agg' > matplotlibrc python3 -m pytest -p no:warnings @@ -190,26 +195,33 @@ jobs: - name: Prepare env run: > - apt-get update && apt-get install -y python3-dev python3-pip python3-setuptools python3-wheel - python3-numpy python3-scipy python3-matplotlib python3-requests python3-networkx + apt-get update && apt-get install -y python3-dev python3-full python3-pip python3-setuptools + python3-wheel python3-numpy python3-scipy python3-matplotlib python3-requests python3-networkx python3-pytest python3-pytest-cov python3-flaky --no-install-recommends - name: Prepare Python env run: | + python3 -m venv venv + . venv/bin/activate python3 -m pip install -U pip setuptools wheel python3 setup.py gen_reqfile --include-extras=test,azure-quantum,braket cat requirements.txt python3 -m pip install -r requirements.txt --prefer-binary - name: Upgrade pybind11 and flaky - run: python3 -m pip install --upgrade pybind11 flaky --prefer-binary + run: | + . venv/bin/activate + python3 -m pip install --upgrade pybind11 flaky --prefer-binary - name: Build and install package - run: python3 -m pip install -ve .[azure-quantum,braket,test] + run: | + . venv/bin/activate + python3 -m pip install -ve .[azure-quantum,braket,test] - name: Pytest run: | + . venv/bin/activate echo 'backend: Agg' > matplotlibrc python3 -m pytest -p no:warnings