forked from microsoft/axe-sarif-converter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
65 lines (52 loc) · 2.26 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
variables:
Codeql.Enabled: true
jobs:
- job: 'tests_and_checks'
pool:
vmImage: 'ubuntu-22.04'
steps:
# This is later than the minimum version the package claims support
# for because semantic-release requires a later LTS version that we
# can require of our users without a breaking change
- task: NodeTool@0
inputs:
versionSpec: '18.16.0'
displayName: use node 18.16.0
- script: yarn install --immutable
displayName: yarn install
- script: yarn lint
displayName: yarn lint
- script: yarn format-check
displayName: yarn format-check
- script: yarn copyrightheaders
displayName: yarn copyrightheaders
- script: yarn build
displayName: yarn build
- script: yarn test --ci
displayName: yarn test
- task: PublishTestResults@2
inputs:
testResultsFiles: $(System.DefaultWorkingDirectory)/test-results/junit.xml
testRunTitle: axe-sarif-converter
condition: always()
displayName: publish test results
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/test-results/coverage/cobertura-coverage.xml
failIfCoverageEmpty: true
displayName: publish code coverage
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(System.DefaultWorkingDirectory)/test-results/'
artifactName: 'CodeAnalysisLogs'
condition: always()
displayName: publish sarif results
- script: yarn semantic-release
displayName: yarn semantic-release (main branch only)
env:
GH_TOKEN: $(github-ada-cat-auth-token)
NPM_TOKEN: $(npmjs-accessibility-insights-team-publish-auth-token)
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(variables['EnableSemanticRelease'], 'true'))