|
13 | 13 | - "docs/**" |
14 | 14 |
|
15 | 15 | jobs: |
16 | | - static-analysis: |
17 | | - name: Static Analysis (linting, vulns) |
18 | | - runs-on: ubuntu-latest |
19 | | - steps: |
20 | | - - uses: actions/checkout@v4 |
21 | | - - uses: jahia/jahia-modules-action/static-analysis@v2 |
22 | | - with: |
23 | | - node_version: 20 |
24 | | - yarn_version: 4.7.0 |
25 | | - yarn_test_version: 4.7.0 |
26 | | - auditci_level: critical |
27 | | - |
28 | | - build: |
29 | | - name: Build Module |
30 | | - runs-on: self-hosted |
| 16 | + on-code-change: |
| 17 | + uses: Jahia/jahia-modules-action/.github/workflows/reusable-on-code-change.yml@v2 |
| 18 | + secrets: inherit |
| 19 | + with: |
| 20 | + static_analysis_node_version: 20 |
| 21 | + static_analysis_auditci_level: critical |
| 22 | + build_container_image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded |
| 23 | + module_branch: ${{ github.ref }} |
| 24 | + sonar_analysis_primary_release_branch: main |
| 25 | + integration_tests_standalone_execute: true |
| 26 | + module_id: javascript-modules-engine |
| 27 | + integration_tests_testrail_project: Javascript Modules Engine |
| 28 | + integration_tests_jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT |
| 29 | + integration_tests_provisioning_manifest: provisioning-manifest-build.yml |
| 30 | + integration_tests_should_use_build_artifacts: true |
| 31 | + integration_tests_should_skip_testrail: true |
31 | 32 | env: |
32 | | - NEXUS_INTERNAL_URL: ${{ secrets.NEXUS_INTERNAL_URL }} |
33 | | - container: |
34 | | - image: ghcr.io/jahia/jahia-docker-mvn-cache:17-jdk-noble-mvn-loaded |
35 | | - credentials: |
36 | | - username: ${{ secrets.GH_PACKAGES_USERNAME }} |
37 | | - password: ${{ secrets.GH_PACKAGES_TOKEN }} |
38 | | - steps: |
39 | | - - uses: actions/checkout@v4 |
40 | | - - uses: jahia/jahia-modules-action/build@v2 |
41 | | - with: |
42 | | - # the test module is built as part of the Maven build |
43 | | - tests_module_type: "disabled" |
44 | | - mvn_settings_filepath: ".github/maven.settings.xml" |
45 | | - nexus_username: ${{ secrets.NEXUS_USERNAME }} |
46 | | - nexus_password: ${{ secrets.NEXUS_PASSWORD }} |
| 33 | + YARN_VERSION: 4.7.0 |
| 34 | + # glob filename, related to the ./artifacts/ folder, to use to fetch the prepackaged site. This jar is generated by the 'build' step. |
| 35 | + # for nightly/manual tests, the prepackaged site is fetched from a Maven repository. |
| 36 | + CYPRESS_PREPACKAGED_SITE_URL: "javascript-modules-samples-hydrogen-prepackaged-*.jar" |
47 | 37 |
|
48 | | - sonar-analysis: |
49 | | - name: Sonar Analysis |
50 | | - needs: build |
51 | | - runs-on: ubuntu-latest |
52 | | - steps: |
53 | | - - uses: actions/checkout@v4 |
54 | | - - uses: jahia/jahia-modules-action/sonar-analysis@v2 |
55 | | - with: |
56 | | - primary_release_branch: main |
57 | | - github_pr_id: ${{github.event.number}} |
58 | | - sonar_url: ${{ secrets.SONAR_URL }} |
59 | | - sonar_token: ${{ secrets.SONAR_TOKEN }} |
60 | | - mvn_settings_filepath: ".github/maven.settings.xml" |
61 | | - nexus_username: ${{ secrets.NEXUS_USERNAME }} |
62 | | - nexus_password: ${{ secrets.NEXUS_PASSWORD }} |
63 | | - |
64 | | - integration-tests-standalone: |
65 | | - name: Integration Tests (Standalone) |
66 | | - needs: build |
67 | | - runs-on: self-hosted |
68 | | - strategy: |
69 | | - fail-fast: false |
70 | | - timeout-minutes: 45 |
71 | | - steps: |
72 | | - - uses: jahia/jahia-modules-action/helper@v2 |
73 | | - - uses: KengoTODA/actions-setup-docker-compose@main |
74 | | - with: |
75 | | - version: "1.29.2" |
76 | | - - uses: actions/setup-node@v4 |
77 | | - with: |
78 | | - node-version: "lts/*" |
79 | | - # Enable corepack, the Node-provided package manager manager |
80 | | - - run: corepack enable |
81 | | - - uses: actions/checkout@v4 |
82 | | - - uses: jahia/jahia-modules-action/integration-tests@v2 |
83 | | - with: |
84 | | - module_id: javascript-modules-engine |
85 | | - tests_path: "javascript-modules-engine/tests/" |
86 | | - testrail_project: Javascript Modules Engine |
87 | | - tests_manifest: provisioning-manifest-build.yml |
88 | | - jahia_image: ghcr.io/jahia/jahia-ee-dev:8-SNAPSHOT |
89 | | - jahia_license: ${{ secrets.JAHIA_LICENSE_8X_FULL }} |
90 | | - should_use_build_artifacts: true |
91 | | - github_artifact_name: js-eng-${{ github.run_number }} |
92 | | - bastion_ssh_private_key: ${{ secrets.BASTION_SSH_PRIVATE_KEY_JAHIACI }} |
93 | | - docker_registries: | |
94 | | - [ |
95 | | - { |
96 | | - "registry": "ghcr.io", |
97 | | - "username": "${{ secrets.GH_PACKAGES_USERNAME }}", |
98 | | - "password": "${{ secrets.GH_PACKAGES_TOKEN }}" |
99 | | - }, |
100 | | - { |
101 | | - "username": "${{ secrets.DOCKERHUB_USERNAME }}", |
102 | | - "password": "${{ secrets.DOCKERHUB_PASSWORD }}" |
103 | | - } |
104 | | - ] |
105 | | - nexus_username: ${{ secrets.NEXUS_USERNAME }} |
106 | | - nexus_password: ${{ secrets.NEXUS_PASSWORD }} |
107 | | - tests_report_name: Test report (Standalone) |
108 | | - testrail_username: ${{ secrets.TESTRAIL_USERNAME }} |
109 | | - testrail_password: ${{ secrets.TESTRAIL_PASSWORD }} |
110 | | - incident_pagerduty_api_key: ${{ secrets.INCIDENT_PAGERDUTY_API_KEY }} |
111 | | - incident_pagerduty_reporter_email: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_EMAIL }} |
112 | | - incident_pagerduty_reporter_id: ${{ secrets.INCIDENT_PAGERDUTY_REPORTER_ID }} |
113 | | - incident_google_spreadsheet_id: ${{ secrets.INCIDENT_GOOGLE_SPREADSHEET_ID }} |
114 | | - incident_google_client_email: ${{ secrets.INCIDENT_GOOGLE_CLIENT_EMAIL }} |
115 | | - incident_google_api_key_base64: ${{ secrets.INCIDENT_GOOGLE_PRIVATE_KEY_BASE64 }} |
116 | | - zencrepes_secret: ${{ secrets.ZENCREPES_WEBHOOK_SECRET }} |
117 | | - env: |
118 | | - YARN_VERSION: 4.7.0 |
119 | | - # glob filename, related to the ./artifacts/ folder, to use to fetch the prepackaged site. This jar is generated by the 'build' step. |
120 | | - # for nightly/manual tests, the prepackaged site is fetched from a Maven repository. |
121 | | - CYPRESS_PREPACKAGED_SITE_URL: "javascript-modules-samples-hydrogen-prepackaged-*.jar" |
122 | | - - name: Test Report |
123 | | - uses: dorny/test-reporter@v1 |
124 | | - if: success() || failure() |
125 | | - with: |
126 | | - name: Tests Report (Standalone) |
127 | | - path: javascript-modules-engine/tests/artifacts/results/xml_reports/**/*.xml |
128 | | - reporter: java-junit |
129 | | - fail-on-error: "false" |
130 | 38 |
|
131 | 39 | # This workflow ensures that Windows builds are exactly the same as on other platforms |
132 | 40 | test-on-windows: |
|
0 commit comments