Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 43 additions & 27 deletions .azure-devops/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,46 +35,62 @@ extends:
Build.SDL.<Roslyn>.Enabled: false
Build.SDL.<ESLint>.Enabled: true
jobs:
- job: Release
- job: Build
displayName: Build ObjectStoreProvider Package
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-latest
os: linux
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(System.DefaultWorkingDirectory)/dist
artifactName: package-$(Build.BuildId)-$(Build.BuildNumber)
- output: pipelineArtifact
targetPath: $(System.DefaultWorkingDirectory)/packages
artifactName: npm-package-$(Build.BuildId)-$(Build.BuildNumber)
steps:
- checkout: self
- task: NodeTool@0
displayName: "Installing node"
inputs:
versionSpec: "16"
- script: yarn --frozen-lockfile
displayName: yarn
- script: yarn ci-test
- script: yarn build && yarn test:ci
displayName: build and test [test]

- task: 1ES.PublishPipelineArtifact@1
displayName: "Publish built package"
inputs:
artifactName: package-$(Build.BuildNumber)
targetPath: $(System.DefaultWorkingDirectory)/dist

- script: |
mkdir -p $(System.DefaultWorkingDirectory)/packages
npm pack --pack-destination $(System.DefaultWorkingDirectory)/packages
displayName: "Generate npm package (.tgz)"

# - task: EsrpRelease@9
# displayName: "ESRP Release to npm"
# inputs:
# connectedservicename: $(Release.ConnectedServiceName)
# usemanagedidentity: true
# keyvaultname: $(Release.KeyVaultName)
# signcertname: $(Release.SignCertName)
# clientid: $(Release.ClientId)
# contenttype: "npm"
# folderlocation: $(System.DefaultWorkingDirectory)/packages
# owners: $(Release.Owners)
# approvers: $(Release.Approvers)
# mainpublisher: ESRPRELPACMAN
# domaintenantid: $(Release.DomainTenantId)

- task: 1ES.PublishPipelineArtifact@1
displayName: 📒 Publish Manifest
- job: Release
displayName: ObjectStoreProvider Release
dependsOn: Build
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-latest
os: linux
templateContext:
type: releaseJob
isProduction: true
inputs:
- input: pipelineArtifact
artifactName: npm-package-$(Build.BuildId)-$(Build.BuildNumber)
targetPath: $(Pipeline.Workspace)/packages
steps:
- task: EsrpRelease@9
displayName: "ESRP Release to npm"
inputs:
artifactName: SBom-$(System.JobAttempt)
targetPath: $(System.DefaultWorkingDirectory)/_manifest
connectedservicename: $(Release.ConnectedServiceName)
usemanagedidentity: true
keyvaultname: $(Release.KeyVaultName)
signcertname: $(Release.SignCertName)
clientid: $(Release.ClientId)
contenttype: "npm"
folderlocation: $(Pipeline.Workspace)/packages
owners: $(Release.Owners)
approvers: $(Release.Approvers)
mainpublisher: ESRPRELPACMAN
domaintenantid: $(Release.DomainTenantId)
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
# Sets up Node and an .npmrc file. This is the official Github supported way to set up node.
- uses: actions/setup-node@v4
with:
node-version: "12"
node-version: "16"
registry-url: "https://registry.npmjs.org"
cache: "yarn"
always-auth: "true"
Expand All @@ -44,7 +44,7 @@ jobs:
run: echo "CHROME_BIN = $CHROME_BIN FIREFOX_BIN = $FIREFOX_BIN"

- name: CI BUILD + UT
run: yarn ci-test
run: yarn build && yarn test

- name: Check whether version was bumped in PR
id: actions_project_version_check
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ jobs:
run: echo "CHROME_BIN = $CHROME_BIN FIREFOX_BIN = $FIREFOX_BIN"

- name: CI BUILD + UT
run: yarn ci-test
run: yarn build && yarn test

- name: Publish package
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publish package
# run: yarn publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ yarn build

```bash
yarn install
yarn ci-test
yarn build && yarn test
```

## Testing
Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"name": "@microsoft/objectstoreprovider",
"version": "0.8.2",
"version": "0.8.4",
"description": "A cross-browser object store library",
"author": "Mukundan Kavanur Kidambi <mukav@microsoft.com>",
"author": "DataStack Team eleretzk@microsoft.com",
"scripts": {
"ci-test": "npm run build && npm run test",
"test": "npm run test:browser -- --single-run && npm run test:sharedworker -- --single-run && npm run test:webworker -- --single-run && npm run test:btree",
"test:ci": "npm run test:browser:ci -- --single-run && npm run test:sharedworker:ci -- --single-run && npm run test:webworker:ci -- --single-run && npm run test:btree",
"test:browser": "npx karma start karma.browser.conf.js --browsers ChromeHeadless,FirefoxHeadless",
"test:browser:ci": "npx karma start karma.browser.conf.js --browsers ChromeHeadless",
"test:sharedworker": "npx karma start karma.webworker.conf.js --browsers ChromeHeadless,FirefoxHeadless",
"test:sharedworker:ci": "npx karma start karma.webworker.conf.js --browsers ChromeHeadless",
"test:webworker": "npx karma start karma.sharedworker.conf.js --browsers ChromeHeadless,FirefoxHeadless",
"test:webworker:ci": "npx karma start karma.sharedworker.conf.js --browsers ChromeHeadless",
"test:debug:browser": "npx karma start karma.browser.conf.js --browsers Chrome,Firefox",
"test:debug:sharedworker": "npx karma start karma.webworker.conf.js --browsers Chrome,Firefox",
"test:debug:webworker": "npx karma start karma.sharedworker.conf.js --browsers Chrome,Firefox",
Expand Down
Loading