fix(deps): update dependency @nacelle/storefront-sdk to v2 #151
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: Nacelle-JS - Pull Request | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
PR: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
# This makes Actions fetch all git history to prevent issues with SonarCloud analysis | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://npm.pkg.github.com/' | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
shopify-checkout: | |
- 'packages/shopify-checkout/**' | |
shopify-cart: | |
- 'packages/shopify-cart/**' | |
################################ | |
# Shopify Checkout PR CICD # | |
################################ | |
- name: Shopify Checkout - npm ci | |
if: steps.changes.outputs.shopify-checkout == 'true' | |
run: npm ci | |
working-directory: packages/shopify-checkout | |
- name: Shopify Checkout - npm run build | |
if: steps.changes.outputs.shopify-checkout == 'true' | |
run: npm run build | |
working-directory: packages/shopify-checkout | |
- name: Shopify Checkout - npm run test:coverage | |
if: steps.changes.outputs.shopify-checkout == 'true' | |
run: npm run test:coverage | |
working-directory: packages/shopify-checkout | |
- name: Analyze with SonarCloud | |
if: steps.changes.outputs.shopify-checkout == 'true' | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
projectBaseDir: packages/shopify-checkout | |
args: > | |
-Dsonar.organization=getnacelle | |
-Dsonar.projectKey=getnacelle_nacelle-js_package_shopify_checkout | |
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info | |
-Dsonar.sources=src | |
-Dsonar.exclusions=src/**/*.test.ts,src/**/*.spec.ts | |
-Dsonar.tests=src | |
-Dsonar.test.inclusions=src/**/*.test.ts,src/**/*.spec.ts | |
################################ | |
# Shopify Cart PR CICD # | |
################################ | |
- name: Shopify Cart - npm ci | |
if: steps.changes.outputs.shopify-cart == 'true' | |
run: npm ci | |
working-directory: packages/shopify-cart | |
- name: Shopify Cart - npm run build | |
if: steps.changes.outputs.shopify-cart == 'true' | |
run: npm run build | |
working-directory: packages/shopify-cart | |
- name: Shopify Cart - npm run test:coverage | |
if: steps.changes.outputs.shopify-cart == 'true' | |
run: npm run test:coverage | |
working-directory: packages/shopify-cart | |
- name: Analyze with SonarCloud | |
if: steps.changes.outputs.shopify-cart == 'true' | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
projectBaseDir: packages/shopify-cart | |
args: > | |
-Dsonar.organization=getnacelle | |
-Dsonar.projectKey=getnacelle_nacelle-js_package_shopify_cart | |
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info | |
-Dsonar.sources=src | |
-Dsonar.exclusions=src/**/*.test.ts,src/**/*.spec.ts | |
-Dsonar.tests=src | |
-Dsonar.test.inclusions=src/**/*.test.ts,src/**/*.spec.ts |