diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..5272633 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,42 @@ +trigger: + branches: + include: ['*'] + tags: + include: ['*'] + +strategy: + matrix: + linux: + imageName: 'ubuntu-16.04' + +pool: + vmImage: $(imageName) + +steps: + +- task: NodeTool@0 + inputs: + versionSpec: '12.x' + displayName: 'Install Node.js' + +- bash: | + /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & + echo ">>> Started xvfb" + displayName: Start xvfb + condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux')) + +- bash: | + echo ">>> Compile, line, test" + yarn + yarn compile + yarn lint + yarn test + displayName: Compile, Lint, Test + env: + DISPLAY: ':99.0' + +- bash: | + echo ">>> Publish" + npm run deploy -- -p $(VSCODE_MARKETPLACE_TOKEN) + displayName: Publish + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))