Skip to content

Commit

Permalink
ci: 👷 update scripts & azure pipeline config
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffJacobson committed Oct 24, 2024
1 parent 0b54fe9 commit 3fc437f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 25 deletions.
48 changes: 24 additions & 24 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,32 @@ stages:
inputs:
version: 22.X

# Install project dependencies using npm in a clean state.
- task: Npm@1
name: npm_install
displayName: NPM Clean Install (CI)
- task: Cache@2
enabled: false
inputs:
# The npm command to run. 'ci' installs dependencies based on the lock file.
command: ci
key: 'pnpm | "$(Agent.OS)" | pnpm-lock.yaml'
path: $(pnpm_config_cache)
displayName: Cache pnpm
- script: |
corepack enable
displayName: "Setup pnpm"
- task: Npm@1
name: npm_test
displayName: NPM Test
continueOnError: true
inputs:
command: custom
customCommand: test
# - script: |
# corepack enable
# corepack prepare pnpm@latest-9 --activate
# pnpm config set store-dir $(pnpm_config_cache)
# displayName: "Setup pnpm"

- script: |
pnpm install
pnpm run build
displayName: "pnpm install and build"
- script: |
pnpm test
name: pnpm_test
displayName: "pnpm test"
- task: PublishTestResults@2
name: publish_test_results
Expand All @@ -77,17 +88,6 @@ stages:
inputs:
summaryFileLocation: coverage/cobertura-coverage.xml

# Run the npm build script to compile the project.
- task: Npm@1
name: run_build
displayName: NPM Build
inputs:
command: custom
# The npm command to run the build script defined in package.json.
customCommand: run build
# Sets the current working directory for this task to the sources directory.
workingDir: $(Build.SourcesDirectory)

# Copy the build output (dist folder) to the staging directory for artifact publishing.
- task: CopyFiles@2
name: copy_files
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Milepost map written with ArcGIS Maps API for JavaScript",
"type": "module",
"scripts": {
"copy-files": "tsx tools/copy-wsdot-webstyles.ts && tsx tools/copy-calcite-assets.ts",
"prepare": "tsx tools/copy-wsdot-webstyles.ts && tsx tools/copy-calcite-assets.ts",
"build": "vite build",
"watch": "vite build -- --watch",
"preview": "vite preview",
Expand Down
1 change: 1 addition & 0 deletions tools/copy-wsdot-webstyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ await mkdir(destinationFolder, { recursive: true });
// Copy the files from the @wsdot/web-styles package into the destination folder.
await cp(wsdotWebStylesFolder, destinationFolder, {
preserveTimestamps: true,
dereference: true,
recursive: true,
filter: (src) => {
// Exclude package.json and README.md.
Expand Down

0 comments on commit 3fc437f

Please sign in to comment.