Add initial one branch pipeline def files #826
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
compile: | |
runs-on: ubuntu-latest | |
name: "Compile TypeScript" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- run: yarn | |
- run: yarn run compile | |
lint: | |
runs-on: ubuntu-latest | |
name: "Format check and lint" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- run: yarn | |
- run: yarn run format:check && yarn run lint | |
unittest: | |
runs-on: ubuntu-latest | |
name: "Unit Tests" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- run: yarn | |
- run: xvfb-run -a yarn run test | |
if: runner.os == 'Linux' | |
- run: yarn run test | |
if: runner.os != 'Linux' | |
publish: | |
runs-on: ubuntu-latest | |
name: "Build vsix" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
- run: yarn | |
- run: yarn run publish | |
- name: get-package-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@main | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: azure-cosmosdb-ads-extension | |
path: ./azure-cosmosdb-ads-extension-${{ steps.package-version.outputs.current-version }}.vsix |