Skip to content

Commit

Permalink
Update dependencies and build script (#272)
Browse files Browse the repository at this point in the history
* Also enable testing on MacOS
* Add codecov.io configuration file
  • Loading branch information
Anthchirp authored May 3, 2021
1 parent 88daa53 commit 9322548
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 18 deletions.
30 changes: 22 additions & 8 deletions .azure-pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ stages:
displayName: Syntax validation
- bash: |
pip install flake8
pip install --disable-pip-version-check flake8
python .azure-pipelines/flake8-validation.py
displayName: Flake8 validation
Expand Down Expand Up @@ -70,7 +70,7 @@ stages:
versionSpec: 3.9

- bash: |
pip install -r requirements_dev.txt
pip install --disable-pip-version-check -r requirements_dev.txt
displayName: Install dependencies
- bash: .azure-pipelines/update-package-version
Expand Down Expand Up @@ -118,8 +118,8 @@ stages:
versionSpec: 3.9

- script: |
pip install -r requirements.txt
pip install -e .
pip install --disable-pip-version-check -r requirements.txt
pip install --disable-pip-version-check -e .
displayName: Install package
- bash: .azure-pipelines/update-hashinfo
Expand Down Expand Up @@ -156,6 +156,21 @@ stages:
PYTHON_VERSION: 3.9
steps:
- template: ci.yml
- job: macOS
pool:
vmImage: macOS-latest
strategy:
matrix:
python36:
PYTHON_VERSION: 3.6
python37:
PYTHON_VERSION: 3.7
python38:
PYTHON_VERSION: 3.8
python39:
PYTHON_VERSION: 3.9
steps:
- template: ci.yml

- stage: deploy
displayName: Publish release
Expand Down Expand Up @@ -187,8 +202,7 @@ stages:
downloadPath: '$(System.ArtifactsDirectory)'

- script: |
pip install -U pip
pip install twine
pip install --disable-pip-version-check twine
displayName: Install twine
- task: TwineAuthenticate@1
Expand Down Expand Up @@ -222,8 +236,8 @@ stages:
versionSpec: 3.9

- script: |
pip install -r requirements.txt
pip install -e .
pip install --disable-pip-version-check -r requirements.txt
pip install --disable-pip-version-check -e .
displayName: Install package
- bash: .azure-pipelines/create-hashinfo-pull-requests
Expand Down
8 changes: 4 additions & 4 deletions .azure-pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ steps:
destinationFolder: "$(Pipeline.Workspace)/src"

- script: |
pip install -r $(Pipeline.Workspace)/src/requirements_dev.txt
pip install $(System.ArtifactsDirectory)/package/pypi/*.whl
pip install --disable-pip-version-check -r $(Pipeline.Workspace)/src/requirements_dev.txt
pip install --disable-pip-version-check $(System.ArtifactsDirectory)/package/pypi/*.whl
displayName: Install package

- script: |
PYTHONDEVMODE=1 pytest -ra --cov=dials_data --cov-report=xml --cov-branch
displayName: Run tests
workingDirectory: $(Pipeline.Workspace)/src

- bash: bash <(curl -s https://codecov.io/bash) -n "Python $(PYTHON_VERSION) $(Agent.OS)"
displayName: 'Publish coverage stats'
- bash: bash <(curl -s https://codecov.io/bash) -t $(CODECOV_TOKEN) -n "Python $(PYTHON_VERSION) $(Agent.OS)"
displayName: Publish coverage stats
continueOnError: True
workingDirectory: $(Pipeline.Workspace)/src
timeoutInMinutes: 2
16 changes: 16 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
coverage:
status:
project:
default:
target: 0%
threshold: 100%
patch:
default:
target: 0%
threshold: 100%

comment:
layout: "diff, flags"
branches:
- master
after_n_builds: 3
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
importlib_resources>=1.1
py==1.10.0
pytest==6.2.2
pytest==6.2.3
pyyaml==5.4.1
8 changes: 3 additions & 5 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
collective.checkdocs==0.2
importlib_resources>=1.1
pip==21.0.1
py==1.10.0
pytest==6.2.2
pytest==6.2.3
pytest-cov==2.11.1
pyyaml==5.4.1
Sphinx==3.5.3
sphinx_rtd_theme==0.5.1
twine==3.4.1
Sphinx==3.5.4
sphinx_rtd_theme==0.5.2
wheel==0.36.2

0 comments on commit 9322548

Please sign in to comment.