Browse Source

Publish test results

pull/208/head
Clemens Wolff 6 years ago
parent
commit
495fe56605
4 changed files with 17 additions and 1 deletions
  1. 1
      .gitignore
  2. 2
      app/app/settings.py
  3. 14
      azure-pipelines.yaml
  4. 1
      requirements.txt

1
.gitignore

@ -74,6 +74,7 @@ nosetests.xml
coverage.xml
*.cover
.hypothesis/
junitxml/
# Translations
*.mo

2
app/app/settings.py

@ -185,6 +185,8 @@ USE_L10N = True
USE_TZ = True
TEST_RUNNER = 'xmlrunner.extra.djangotestrunner.XMLTestRunner'
TEST_OUTPUT_DIR = path.join(BASE_DIR, 'junitxml')
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.0/howto/static-files/

14
azure-pipelines.yaml

@ -5,9 +5,21 @@ pool:
vmImage: 'ubuntu-latest'
steps:
- script: docker build --target=builder .
- script: docker build --tag=doccano --target=builder .
displayName: 'Run tests'
- script: docker run doccano tar Ccf /doccano/app - junitxml | tar Cxf "$(Build.ArtifactStagingDirectory)" -
displayName: 'Export test results'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'TEST-*.xml'
searchFolder: '$(Build.ArtifactStagingDirectory)/junitxml'
mergeTestResults: true
testRunTitle: 'server.tests'
displayName: 'Publish test results'
- script: DOCKER_PASSWORD="$(docker_password)" tools/cd.sh "azdo-$(Build.BuildId)"
displayName: 'Push docker image'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), ne(variables['docker_password'], ''))

1
requirements.txt

@ -27,4 +27,5 @@ social-auth-app-django==3.1.0
social-auth-core[azuread]==3.0.0
text-unidecode==1.2
tornado==5.0.2
unittest-xml-reporting==2.5.1
whitenoise[brotli]==4.1.2
Loading…
Cancel
Save