2023-05-25 10:52:29 +01:00
|
|
|
trigger:
|
|
|
|
|
- main
|
|
|
|
|
- dev
|
|
|
|
|
- feature/*
|
|
|
|
|
- hotfix/*
|
|
|
|
|
- bugfix/*
|
|
|
|
|
- release/*
|
|
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
|
matrix:
|
2023-07-03 12:03:36 +01:00
|
|
|
UbuntuPython38:
|
|
|
|
|
python.version: '3.8'
|
|
|
|
|
imageName: 'ubuntu-latest'
|
|
|
|
|
UbuntuPython310:
|
|
|
|
|
python.version: '3.10'
|
|
|
|
|
imageName: 'ubuntu-latest'
|
|
|
|
|
WindowsPython38:
|
|
|
|
|
python.version: '3.8'
|
|
|
|
|
imageName: 'windows-latest'
|
|
|
|
|
WindowsPython310:
|
|
|
|
|
python.version: '3.10'
|
|
|
|
|
imageName: 'windows-latest'
|
|
|
|
|
MacOSPython38:
|
2023-05-25 10:52:29 +01:00
|
|
|
python.version: '3.8'
|
2023-07-03 12:03:36 +01:00
|
|
|
imageName: 'macOS-latest'
|
|
|
|
|
MacOSPython310:
|
2023-05-25 10:52:29 +01:00
|
|
|
python.version: '3.10'
|
2023-07-03 12:03:36 +01:00
|
|
|
imageName: 'macOS-latest'
|
|
|
|
|
|
|
|
|
|
pool:
|
|
|
|
|
vmImage: $(imageName)
|
2023-05-25 10:52:29 +01:00
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- task: UsePythonVersion@0
|
|
|
|
|
inputs:
|
|
|
|
|
versionSpec: '$(python.version)'
|
|
|
|
|
displayName: 'Use Python $(python.version)'
|
|
|
|
|
|
2023-06-27 12:07:33 +00:00
|
|
|
- script: |
|
2023-06-27 13:07:54 +00:00
|
|
|
python -m pip install pre-commit
|
2023-06-27 12:07:33 +00:00
|
|
|
pre-commit install
|
|
|
|
|
pre-commit run --all-files
|
|
|
|
|
displayName: 'Run pre-commits'
|
|
|
|
|
|
2023-05-25 10:52:29 +01:00
|
|
|
- script: |
|
|
|
|
|
python -m pip install --upgrade pip==23.0.1
|
|
|
|
|
pip install wheel==0.38.4 --upgrade
|
|
|
|
|
pip install setuptools==66 --upgrade
|
|
|
|
|
pip install build==0.10.0
|
|
|
|
|
pip install pytest-azurepipelines
|
|
|
|
|
displayName: 'Install build dependencies'
|
|
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
|
python -m build
|
|
|
|
|
displayName: 'Build PrimAITE'
|
|
|
|
|
|
|
|
|
|
- script: |
|
|
|
|
|
PRIMAITE_WHEEL=$(ls ./dist/primaite*.whl)
|
|
|
|
|
python -m pip install $PRIMAITE_WHEEL[dev]
|
2023-07-03 12:44:01 +00:00
|
|
|
displayName: 'Install PrimAITE'
|
|
|
|
|
condition: eq( variables['Agent.OS'], 'Linux' )
|
|
|
|
|
|
|
|
|
|
- script: |
|
2023-07-03 12:37:08 +00:00
|
|
|
forfiles /p dist\ /m *.whl /c "cmd /c python -m pip install @file"
|
2023-05-25 10:52:29 +01:00
|
|
|
displayName: 'Install PrimAITE'
|
2023-07-03 12:44:01 +00:00
|
|
|
condition: eq( variables['Agent.OS'], 'Windows_NT' )
|
2023-05-25 10:52:29 +01:00
|
|
|
|
2023-06-08 08:39:00 +01:00
|
|
|
- script: |
|
|
|
|
|
primaite setup
|
|
|
|
|
displayName: 'Perform PrimAITE Setup'
|
|
|
|
|
|
2023-05-25 10:52:29 +01:00
|
|
|
- script: |
|
|
|
|
|
pytest tests/
|
2023-06-30 09:08:13 +01:00
|
|
|
displayName: 'Run tests'
|