Skip to content

First pass

First pass #6

Workflow file for this run

name: PR
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: "pnpm"
- name: Creating .npmrc for Azure Artifacts
run: |
cat << EOF >> "$HOME/.npmrc"
@bentley:registry=https://pkgs.dev.azure.com/bentleycs/_packaging/Packages/npm/registry/
always-auth=true
//registry.npmjs.org/:_authToken=XXXXX-XXXXX-XXXXX-XXXXX
; begin auth token
//pkgs.dev.azure.com/bentleycs/_packaging/Packages/npm/registry/:username=bentleycs
//pkgs.dev.azure.com/bentleycs/_packaging/Packages/npm/registry/:_password=${AZURE_ARTIFACTS_PAT}
//pkgs.dev.azure.com/bentleycs/_packaging/Packages/npm/registry/:email=npm requires email to be set but doesn't use the value
//pkgs.dev.azure.com/bentleycs/_packaging/Packages/npm/:username=bentleycs
//pkgs.dev.azure.com/bentleycs/_packaging/Packages/npm/:_password=${AZURE_ARTIFACTS_PAT}
//pkgs.dev.azure.com/bentleycs/_packaging/Packages/npm/:email=npm requires email to be set but doesn't use the value
; end auth token
EOF
env:
AZURE_ARTIFACTS_PAT: ${{ secrets.NPM_PACKAGE_PUBLISH_BENTLEYCS }}
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm lint
- name: Run Unit Tests
run: pnpm test