Azure Pipelines
Azure Pipelines automatically builds and tests code projects to make them available to others. Azure Pipelines combines continuous integration (CI) and continuous delivery (CD) to constantly and consistently test and build your code and ship it to any target, such as Azure App Service or the new Azure Static Web Apps.
The following YAML workflow file created into the ./azure-pipelines.yml
as a default by superplate, if Azure Pipelines is selected as a CI plugin.
trigger: - main - master pr: - main - master
pool: vmImage: ubuntu-latest
jobs: - job: steps: - checkout: self persistCredentials: true
- task: NodeTool@0 inputs: versionSpec: "14.x" displayName: "Setup node env"
- script: | 'npm ci' displayName: "Install dependencies"
- script: | 'npm run lint' displayName: "Run lint"
- script: | 'npm run test' displayName: "Run tests"
note
If you are using Yarn2, you can take advantage of Zero-Installs, negating the need for a caching step.
tip
The following commands are added to azure-pipelines.yml
by superplate if any of plugins listed below is selected during project creation phase.
note
You can use the following commands in case of adding Azure Pipelines to existing project later.
#
Package manager- npm
- yarn
- npm ci
- yarn
#
Install dependencies- npm
- yarn
- npm ci
- yarn
#
Run ESlint- npm
- yarn
- npm run lint
- yarn lint
#
Testing#
Run tests- npm
- yarn
- npm run test
- yarn test
#
Run Cypress E2E Testing- npm
- yarn
- npm run cypress:test
- yarn cypress:test
#
WebdriverIO E2E Testing- npm
- yarn
- npm run webdriver:run
- yarn webdriver:run
tip
If you are building a static-rendered Next.js website in Azure, consider deploying to Azure Static Web Apps