mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-27 19:16:44 +00:00
Update azure testing settings (#8955)
* Set up CI with Azure Pipelines [skip ci] * update used tasks and python * Update test_stats.yml for Azure Pipelines * fix install command * fix uv system setting * Update test_stats.yml for Azure Pipelines * Update test_stats.yml for Azure Pipelines * Update test_stats.yml for Azure Pipelines * ignore test * remove old test * remove comments * update triggers * Update README.md * fix style * Revert "ignore test" This reverts commit f96f8caf4e3d269324755298e78f147bc0679741. * remove dead link to credits * ignore azure issues
This commit is contained in:
parent
d69592ad4b
commit
ded1cfaa45
@ -1,10 +1,13 @@
|
|||||||
# Python Django
|
|
||||||
# Test a Django project on multiple versions of Python.
|
|
||||||
# Add steps that analyze code, save build artifacts, deploy, and more:
|
|
||||||
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- master
|
batch: true
|
||||||
|
branches:
|
||||||
|
include:
|
||||||
|
- master
|
||||||
|
- stable
|
||||||
|
- refs/tags/*
|
||||||
|
paths:
|
||||||
|
include:
|
||||||
|
- src/backend
|
||||||
|
|
||||||
pool:
|
pool:
|
||||||
vmImage: ubuntu-latest
|
vmImage: ubuntu-latest
|
||||||
@ -37,17 +40,19 @@ steps:
|
|||||||
print('##vso[task.setvariable variable=projectRoot]{}'.format(project_location))
|
print('##vso[task.setvariable variable=projectRoot]{}'.format(project_location))
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
python -m pip install --upgrade pip setuptools wheel
|
python -m pip install --upgrade pip setuptools wheel uv
|
||||||
pip install --require-hashes -r requirements.txt
|
uv pip install --require-hashes -r src/backend/requirements.txt
|
||||||
pip install --require-hashes -r requirements-dev.txt
|
uv pip install --require-hashes -r src/backend/requirements-dev.txt
|
||||||
pip install unittest-xml-reporting coverage invoke
|
|
||||||
sudo apt-get install poppler-utils
|
sudo apt-get install poppler-utils
|
||||||
sudo apt-get install libpoppler-dev
|
sudo apt-get install libpoppler-dev
|
||||||
|
uv pip install unittest-xml-reporting coverage invoke
|
||||||
displayName: 'Install prerequisites'
|
displayName: 'Install prerequisites'
|
||||||
|
env:
|
||||||
|
UV_SYSTEM_PYTHON: 1
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
pushd '$(projectRoot)'
|
pushd '$(projectRoot)'
|
||||||
invoke update
|
invoke update --uv
|
||||||
coverage run manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input
|
coverage run manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input
|
||||||
coverage xml -i
|
coverage xml -i
|
||||||
displayName: 'Run tests'
|
displayName: 'Run tests'
|
||||||
@ -57,7 +62,11 @@ steps:
|
|||||||
INVENTREE_MEDIA_ROOT: ./media
|
INVENTREE_MEDIA_ROOT: ./media
|
||||||
INVENTREE_STATIC_ROOT: ./static
|
INVENTREE_STATIC_ROOT: ./static
|
||||||
INVENTREE_BACKUP_DIR: ./backup
|
INVENTREE_BACKUP_DIR: ./backup
|
||||||
|
INVENTREE_SITE_URL: http://localhost:8000
|
||||||
INVENTREE_PLUGINS_ENABLED: true
|
INVENTREE_PLUGINS_ENABLED: true
|
||||||
|
UV_SYSTEM_PYTHON: 1
|
||||||
|
INVENTREE_DEBUG: true
|
||||||
|
INVENTREE_LOG_LEVEL: INFO
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
inputs:
|
inputs:
|
||||||
@ -65,7 +74,6 @@ steps:
|
|||||||
testRunTitle: 'Python $(PYTHON_VERSION)'
|
testRunTitle: 'Python $(PYTHON_VERSION)'
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
|
|
||||||
- task: PublishCodeCoverageResults@1
|
- task: PublishCodeCoverageResults@2
|
||||||
inputs:
|
inputs:
|
||||||
codeCoverageTool: Cobertura
|
|
||||||
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
|
@ -9,6 +9,7 @@
|
|||||||
[](https://inventree.readthedocs.io/en/latest/?badge=latest)
|
[](https://inventree.readthedocs.io/en/latest/?badge=latest)
|
||||||

|

|
||||||
[](https://app.netlify.com/sites/inventree/deploys)
|
[](https://app.netlify.com/sites/inventree/deploys)
|
||||||
|
[](https://dev.azure.com/InvenTree/InvenTree%20test%20statistics/_build/latest?definitionId=3&branchName=testing)
|
||||||
|
|
||||||
[](https://bestpractices.coreinfrastructure.org/projects/7179)
|
[](https://bestpractices.coreinfrastructure.org/projects/7179)
|
||||||
[](https://securityscorecards.dev/viewer/?uri=github.com/inventree/InvenTree)
|
[](https://securityscorecards.dev/viewer/?uri=github.com/inventree/InvenTree)
|
||||||
@ -156,7 +157,7 @@ If you use InvenTree and find it to be useful, please consider [sponsoring the p
|
|||||||
## :gem: Acknowledgements
|
## :gem: Acknowledgements
|
||||||
|
|
||||||
We want to acknowledge [PartKeepr](https://github.com/partkeepr/PartKeepr) as a valuable predecessor and inspiration.
|
We want to acknowledge [PartKeepr](https://github.com/partkeepr/PartKeepr) as a valuable predecessor and inspiration.
|
||||||
Find a full list of used third-party libraries in [our documentation](https://docs.inventree.org/en/latest/credits/).
|
Find a full list of used third-party libraries in the license information dialog of your instance.
|
||||||
|
|
||||||
## :heart: Support
|
## :heart: Support
|
||||||
|
|
||||||
|
@ -20,6 +20,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pattern": "https://opensource.org/license/MIT"
|
"pattern": "https://opensource.org/license/MIT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pattern": "^https://dev.azure.com"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user