Skip to content

refactor: Cleanup code (address SonarQube issues) #1233

refactor: Cleanup code (address SonarQube issues)

refactor: Cleanup code (address SonarQube issues) #1233

# This workflow is triggered every time a change is pushed to any branches
# Github actions command reference: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: On Code Change (PR)
# The workflow could also be triggered on PRs
on:
pull_request:
types: [opened, reopened, synchronize]
# Disable the workflow for doc-only changes
# https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-excluding-paths
paths-ignore:
- "docs/**"
jobs:
on-code-change:
uses: Jahia/jahia-modules-action/.github/workflows/reusable-on-code-change.yml@v2
secrets: inherit
with:
static_analysis_node_version: 20
static_analysis_auditci_level: critical
build_container_image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded
module_branch: ${{ github.ref }}
sonar_analysis_primary_release_branch: main
integration_tests_standalone_execute: true
module_id: javascript-modules-engine
integration_tests_testrail_project: Javascript Modules Engine
integration_tests_jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT
integration_tests_provisioning_manifest: provisioning-manifest-build.yml
integration_tests_should_use_build_artifacts: true
integration_tests_should_skip_testrail: true
# This workflow ensures that Windows builds are exactly the same as on other platforms
test-on-windows:
name: Test on Windows
runs-on: windows-latest
steps:
- # https://github.com/actions/checkout/issues/135
name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout code
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: latest
check-latest: true
- name: Install and build dependencies
run: yarn && yarn workspace "@jahia/vite-plugin" build
- name: Run tests
run: yarn workspace "@jahia/vite-plugin" test