Skip to content

Commit

Permalink
Improve isolation between wheel build and tests in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
touilleMan committed Jul 21, 2020
1 parent 53ec82a commit 44c4cd1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .azure-pipelines.yml
Expand Up @@ -87,16 +87,22 @@ jobs:
- bash: |
set -eux
python --version
pip install -U wheel pip setuptools
pip install -r pre-requirements.txt
sudo apt-get install \
postgresql-$(postgresql.version) \
desktop-file-utils # Provides `update-desktop-database` used by `tests/scripts/run_testenv.sh`
psql --version
displayName: 'Bootstrap'
- bash: |
set -eux
# Build in a venv to isolate from tests
python -m venv venv_build
./venv_build/bin/python -m pip install -r pre-requirements.txt
# Build the parsec wheel
python setup.py bdist_wheel
./venv_build/bin/python setup.py bdist_wheel
displayName: 'Build Wheel'
- bash: |
set -eux
# Install the parsec wheel with all dependencies
pip install $(ls dist/parsec_cloud-*.whl)[all]
# Check dependency compatibility
Expand Down Expand Up @@ -164,8 +170,8 @@ jobs:
architecture: 'x64'
- bash: |
set -eux
python --version
python -m pip install -U wheel pip setuptools
python.exe --version
pip install -r pre-requirements.txt
choco install -y --limit-output winfsp --pre --version=$(winfsp.version)
# Install winfsp-test and put it in PATH
mkdir winfsp-test
Expand All @@ -175,14 +181,19 @@ jobs:
displayName: 'Bootstrap'
- bash: |
set -eux
python -m venv venv_build
./venv_build/Scripts/python.exe -m pip install -r pre-requirements.txt
# Build the parsec wheel
python setup.py bdist_wheel
./venv_build/Scripts/python.exe setup.py bdist_wheel
displayName: 'Build Wheel'
- bash: |
set -eux
# Install the parsec wheel with all dependencies
pip install $(ls dist/parsec_cloud-*.whl)[all]
# Check dependency compatibility
pip check parsec[all]
# Check winfsp-tests availability
python -c "import winfspy.tests.winfsp_tests"
python.exe -c "import winfspy.tests.winfsp_tests"
# Create isolated test directory
mkdir -p "$(Agent.TempDirectory)"\\empty
cp -R tests "$(Agent.TempDirectory)"\\empty
Expand Down
File renamed without changes.

0 comments on commit 44c4cd1

Please sign in to comment.