Skip to content

fix(deps): update nextjs monorepo to v14 (major) #230

fix(deps): update nextjs monorepo to v14 (major)

fix(deps): update nextjs monorepo to v14 (major) #230

Workflow file for this run

name: Nacelle-JS - Pull Request
on:
pull_request:
branches: [main]
jobs:
PR:
runs-on: ubuntu-20.04
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Cache NPM packages
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- 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