Skip to content

Commit

Permalink
Update azure testing settings (#8955)
Browse files Browse the repository at this point in the history
* 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 f96f8ca.

* remove dead link to credits

* ignore azure issues
  • Loading branch information
matmair authored Feb 10, 2025
1 parent d69592a commit ded1cfa
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
34 changes: 21 additions & 13 deletions .devops/testing_ci.yml → .devops/test_stats.yml
Original file line number Diff line number Diff line change
@@ -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:
- master
batch: true
branches:
include:
- master
- stable
- refs/tags/*
paths:
include:
- src/backend

pool:
vmImage: ubuntu-latest
Expand Down Expand Up @@ -37,17 +40,19 @@ steps:
print('##vso[task.setvariable variable=projectRoot]{}'.format(project_location))
- script: |
python -m pip install --upgrade pip setuptools wheel
pip install --require-hashes -r requirements.txt
pip install --require-hashes -r requirements-dev.txt
pip install unittest-xml-reporting coverage invoke
python -m pip install --upgrade pip setuptools wheel uv
uv pip install --require-hashes -r src/backend/requirements.txt
uv pip install --require-hashes -r src/backend/requirements-dev.txt
sudo apt-get install poppler-utils
sudo apt-get install libpoppler-dev
uv pip install unittest-xml-reporting coverage invoke
displayName: 'Install prerequisites'
env:
UV_SYSTEM_PYTHON: 1

- script: |
pushd '$(projectRoot)'
invoke update
invoke update --uv
coverage run manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input
coverage xml -i
displayName: 'Run tests'
Expand All @@ -57,15 +62,18 @@ steps:
INVENTREE_MEDIA_ROOT: ./media
INVENTREE_STATIC_ROOT: ./static
INVENTREE_BACKUP_DIR: ./backup
INVENTREE_SITE_URL: http://localhost:8000
INVENTREE_PLUGINS_ENABLED: true
UV_SYSTEM_PYTHON: 1
INVENTREE_DEBUG: true
INVENTREE_LOG_LEVEL: INFO

- task: PublishTestResults@2
inputs:
testResultsFiles: "**/TEST-*.xml"
testRunTitle: 'Python $(PYTHON_VERSION)'
condition: succeededOrFailed()

- task: PublishCodeCoverageResults@1
- task: PublishCodeCoverageResults@2
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[![Documentation Status](https://readthedocs.org/projects/inventree/badge/?version=latest)](https://inventree.readthedocs.io/en/latest/?badge=latest)
![Docker Build](https://github.com/inventree/inventree/actions/workflows/docker.yaml/badge.svg)
[![Netlify Status](https://api.netlify.com/api/v1/badges/9bbb2101-0a4d-41e7-ad56-b63fb6053094/deploy-status)](https://app.netlify.com/sites/inventree/deploys)
[![Performance Testing](https://dev.azure.com/InvenTree/InvenTree%20test%20statistics/_apis/build/status%2Fmatmair.InvenTree?branchName=testing)](https://dev.azure.com/InvenTree/InvenTree%20test%20statistics/_build/latest?definitionId=3&branchName=testing)

[![OpenSSF Best Practices](https://bestpractices.coreinfrastructure.org/projects/7179/badge)](https://bestpractices.coreinfrastructure.org/projects/7179)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/inventree/InvenTree/badge)](https://securityscorecards.dev/viewer/?uri=github.com/inventree/InvenTree)
Expand Down Expand Up @@ -156,7 +157,7 @@ If you use InvenTree and find it to be useful, please consider [sponsoring the p
## :gem: Acknowledgements

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

Expand Down
3 changes: 3 additions & 0 deletions docs/mlc_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
},
{
"pattern": "https://opensource.org/license/MIT"
},
{
"pattern": "^https://dev.azure.com"
}
]
}

0 comments on commit ded1cfa

Please sign in to comment.