Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Travis to Azure #116

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

44 changes: 44 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
jobs:
- job: Linux
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Python34:
python.version: 3.4
Python35:
python.version: 3.5
Python36:
python.version: 3.6
Python37:
python.version: 3.7
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
- script: pip install -r requirements-test.txt
displayName: 'Install requirements'
- script: flake8 .
displayName: PEP8

# Since we develop a library, we want to make sure that it properly runs
# after installation. We already ran into an issue when some files were
# forgotten to be included in package_data and it was not caught by tests.

# So first we run unit tests against raw source code and report coverage.

- script: pytest -v tests/ --cov=m2cgen/ --ignore=tests/e2e/
displayName: Pytest
# - script: coveralls
# displayName: Coveralls
Comment on lines +33 to +34
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be configured manually (with token):

[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/3e5c0a43-effc-4bd1-9192-d036a83503e2.sh
Not on Travis or CircleCI. You have to provide either repo_token in .coveralls.yml or set the COVERALLS_REPO_TOKEN env var.
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/coveralls/cli.py", line 60, in main
    service_name=options['--service'])
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/coveralls/api.py", line 59, in __init__
    self.ensure_token()
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/coveralls/api.py", line 68, in ensure_token
    self.config_filename))
coveralls.exception.CoverallsException: Not on Travis or CircleCI. You have to provide either repo_token in .coveralls.yml or set the COVERALLS_REPO_TOKEN env var.


# Then we install it as a library, remove source code and run e2e tests.

- script: python setup.py install
displayName: 'Install package'
- script: rm -rfd m2cgen/
displayName: 'Remove sources'
- script: pytest -v tests/e2e/
timeoutInMinutes: 120
displayName: Pytest
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ pytest-mock==1.10.0
coveralls==1.5.1
pytest-cov==2.6.1
py-mini-racer==0.1.18
attrs==19.1.0
Copy link
Member Author

@StrikerRUS StrikerRUS Oct 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To fix

[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/8eb70c1f-fd00-43a7-bea0-aa872dac2bfe.sh
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.5.7/x64/bin/pytest", line 10, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/_pytest/config/__init__.py", line 61, in main
    config = _prepareconfig(args, plugins)
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/_pytest/config/__init__.py", line 182, in _prepareconfig
    config = get_config()
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/_pytest/config/__init__.py", line 156, in get_config
    pluginmanager.import_plugin(spec)
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/_pytest/config/__init__.py", line 530, in import_plugin
    __import__(importspec)
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/_pytest/tmpdir.py", line 25, in <module>
    class TempPathFactory(object):
  File "/opt/hostedtoolcache/Python/3.5.7/x64/lib/python3.5/site-packages/_pytest/tmpdir.py", line 35, in TempPathFactory
    lambda p: Path(os.path.abspath(six.text_type(p)))
TypeError: attrib() got an unexpected keyword argument 'convert'

error.

Refer to pytest-dev/pytest#3280 (comment).