<commit_before>#
# Copyright 2013-2020 the original author or authors from the JHipster project.
#
# This file is part of the JHipster project, see https://www.jhipster.tech/
# for more information.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Angular
on:
    push:
        branches-ignore:
            - 'dependabot/**'
    pull_request:
        branches:
            - '*'
env:
    JHI_RUN_APP: 1
    JHI_JDK: 11
    JHI_LIB_REPO: https://github.com/jhipster/jhipster.git
    JHI_LIB_BRANCH: master
    JHI_GEN_REPO: https://github.com/jhipster/generator-jhipster.git
    JHI_GEN_BRANCH: master
    SPRING_OUTPUT_ANSI_ENABLED: ALWAYS
    SPRING_JPA_SHOW_SQL: false
    JHI_DISABLE_WEBPACK_LOGS: true
    JHI_E2E_HEADLESS: true
    JHI_SCRIPTS: ./test-integration/scripts
    NG_CLI_ANALYTICS: 'false'
    JHI_GITHUB_CI: true
    FORCE_COLOR: 1
jobs:
    applications:
        name: ${{ matrix.app-type }}
        runs-on: ${{ matrix.os }}
        if: >-
            !contains(github.event.head_commit.message, '[react]') &&
            !contains(github.event.head_commit.message, '[vue]') &&
            !contains(github.event.pull_request.title, '[react]') &&
            !contains(github.event.pull_request.title, '[vue]') &&
            !contains(github.event.head_commit.message, '[ci skip]') &&
            !contains(github.event.head_commit.message, '[skip ci]') &&
            !contains(github.event.pull_request.title, '[skip ci]') &&
            !contains(github.event.pull_request.title, '[ci skip]') &&
            (github.event.pull_request.draft == false || !contains(github.event.pull_request.labels.*.name, 'pr: skip-ci')) &&
            !contains(github.event.pull_request.user.login, 'dependabot')
        timeout-minutes: 40
        strategy:
            fail-fast: false
            matrix:
                node_version: [12.16.1]
                os: [ubuntu-latest]
                app-type:
                    - ngx-default
                    - ngx-psql-es-noi18n-mapsid
                    - ngx-mariadb-oauth2-infinispan
                    - ngx-mongodb-kafka-cucumber
                    - ngx-h2mem-ws-nol2
                    - ngx-gradle-fr
                    - ngx-gradle-psql-es-noi18n-mapsid
                    - ngx-gradle-mariadb-oauth2-infinispan
                    - ngx-gradle-mongodb-kafka-cucumber
                    - ngx-gradle-h2disk-ws-nocache
                include:
                    - app-type: ngx-default
                      entity: sql
                      profile: prod
                      war: 0
                      protractor: 1
                      testcontainers: 1
                    - app-type: ngx-psql-es-noi18n-mapsid
                      entity: sqlfull
                      profile: prod
                      war: 0
                      protractor: 1
                      testcontainers: 0
                    - app-type: ngx-mariadb-oauth2-infinispan
                      entity: sqlfull
                      profile: prod
                      war: 0
                      protractor: 1
                      testcontainers: 0
                    - app-type: ngx-mongodb-kafka-cucumber
                      entity: mongodb
                      profile: dev,webpack
                      war: 0
                      protractor: 1
                      testcontainers: 0
                    - app-type: ngx-h2mem-ws-nol2
                      entity: sql
                      profile: dev,webpack
                      war: 0 # TODO: need change to 1, when maven+war is fixed
                      protractor: 1
                      testcontainers: 0
                    - app-type: ngx-gradle-fr
                      entity: sql
                      profile: prod
                      war: 0
                      protractor: 1
                      testcontainers: 0
                    - app-type: ngx-gradle-psql-es-noi18n-mapsid
                      entity: sqlfull
                      profile: prod
                      war: 0
                      protractor: 1
                      testcontainers: 1
                    - app-type: ngx-gradle-mariadb-oauth2-infinispan
                      entity: sql
                      profile: dev,webpack
                      war: 0
                      protractor: 1
                      testcontainers: 1
                    - app-type: ngx-gradle-mongodb-kafka-cucumber
                      entity: mongodb
                      profile: prod
                      war: 0
                      protractor: 1
                      testcontainers: 0
                    - app-type: ngx-gradle-h2disk-ws-nocache
                      entity: sql
                      profile: dev,webpack
                      war: 1
                      protractor: 1
                      testcontainers: 0
        env:
            JHI_ENTITY: ${{ matrix.entity }}
            JHI_APP: ${{ matrix.app-type }}
            JHI_PROFILE: ${{ matrix.profile }}
            JHI_WAR: ${{ matrix.war }}
            JHI_PROTRACTOR: ${{ matrix.protractor }}
            JHI_TESTCONTAINERS: ${{ matrix.testcontainers }}
        steps:
            #----------------------------------------------------------------------
            # Install all tools and check configuration
            #----------------------------------------------------------------------
            - uses: actions/checkout@v2
            - uses: actions/setup-node@v2.1.1
              with:
                  node-version: ${{ matrix.node_version }}
            - uses: actions/setup-java@v1
              with:
                  java-version: '11.x'
            - name: Get chrome/chromedriver version
              id: chromedriver-version
              run: |
                  CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \
                  && CHROMEDRIVER_VERSION=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
                  && echo "::set-output name=version::$CHROMEDRIVER_VERSION"
            - name: 'TOOLS: configure tools installed by the system'
              run: $JHI_SCRIPTS/03-system.sh
            - name: 'TOOLS: configure git'
              run: $JHI_SCRIPTS/04-git-config.sh
            #----------------------------------------------------------------------
            # Install JHipster and generate project+entities
            #----------------------------------------------------------------------
            - name: 'GENERATION: install JHipster'
              run: $JHI_SCRIPTS/10-install-jhipster.sh
            - name: 'GENERATION: entities'
              run: $JHI_SCRIPTS/11-generate-entities.sh
            - name: 'GENERATION: project'
              run: $JHI_SCRIPTS/12-generate-project.sh
            - name: 'GENERATION: replace version in generated project'
              run: $JHI_SCRIPTS/13-replace-version-generated-project.sh
            - name: 'GENERATION: jhipster info'
              run: $JHI_SCRIPTS/14-jhipster-info.sh
            #----------------------------------------------------------------------
            # Launch tests
            #----------------------------------------------------------------------
            - name: 'TESTS: Start docker-compose containers'
              run: $JHI_SCRIPTS/20-docker-compose.sh
            - name: 'TESTS: backend'
              run: $JHI_SCRIPTS/21-tests-backend.sh
            - name: 'TESTS: frontend'
              run: $JHI_SCRIPTS/22-tests-frontend.sh
            - name: 'TESTS: packaging'
              run: $JHI_SCRIPTS/23-package.sh
            - name: 'Synchronize chromedriver version'
              if: ${{ matrix.protractor == 1 }}
              run: npm run e2e:update-webdriver --versions.chrome ${{ steps.chromedriver-version.outputs.version }}
              working-directory: /home/runner/app
            - name: 'TESTS: End-to-End'
              run: $JHI_SCRIPTS/24-tests-e2e.sh
            - name: 'TESTS: Sonar analysis'
              run: $JHI_SCRIPTS/25-sonar-analyze.sh
              env:
                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
                  SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
<commit_msg>[angular] Call Cypress in e2e step instead of Protractor<commit_after>#
# Copyright 2013-2020 the original author or authors from the JHipster project.
#
# This file is part of the JHipster project, see https://www.jhipster.tech/
# for more information.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

name: Angular
on:
    push:
        branches-ignore:
            - 'dependabot/**'
    pull_request:
        branches:
            - '*'
env:
    JHI_RUN_APP: 1
    JHI_JDK: 11
    JHI_LIB_REPO: https://github.com/jhipster/jhipster.git
    JHI_LIB_BRANCH: master
    JHI_GEN_REPO: https://github.com/jhipster/generator-jhipster.git
    JHI_GEN_BRANCH: master
    SPRING_OUTPUT_ANSI_ENABLED: ALWAYS
    SPRING_JPA_SHOW_SQL: false
    JHI_DISABLE_WEBPACK_LOGS: true
    JHI_E2E_HEADLESS: true
    JHI_SCRIPTS: ./test-integration/scripts
    NG_CLI_ANALYTICS: 'false'
    JHI_GITHUB_CI: true
    FORCE_COLOR: 1
jobs:
    applications:
        name: ${{ matrix.app-type }}
        runs-on: ${{ matrix.os }}
        if: >-
            !contains(github.event.head_commit.message, '[react]') &&
            !contains(github.event.head_commit.message, '[vue]') &&
            !contains(github.event.pull_request.title, '[react]') &&
            !contains(github.event.pull_request.title, '[vue]') &&
            !contains(github.event.head_commit.message, '[ci skip]') &&
            !contains(github.event.head_commit.message, '[skip ci]') &&
            !contains(github.event.pull_request.title, '[skip ci]') &&
            !contains(github.event.pull_request.title, '[ci skip]') &&
            (github.event.pull_request.draft == false || !contains(github.event.pull_request.labels.*.name, 'pr: skip-ci')) &&
            !contains(github.event.pull_request.user.login, 'dependabot')
        timeout-minutes: 40
        strategy:
            fail-fast: false
            matrix:
                node_version: [12.16.1]
                os: [ubuntu-latest]
                app-type:
                    - ngx-default
                    - ngx-psql-es-noi18n-mapsid
                    - ngx-mariadb-oauth2-infinispan
                    - ngx-mongodb-kafka-cucumber
                    - ngx-h2mem-ws-nol2
                    - ngx-gradle-fr
                    - ngx-gradle-psql-es-noi18n-mapsid
                    - ngx-gradle-mariadb-oauth2-infinispan
                    - ngx-gradle-mongodb-kafka-cucumber
                    - ngx-gradle-h2disk-ws-nocache
                include:
                    - app-type: ngx-default
                      entity: sql
                      profile: prod
                      war: 0
                      cypress: 1
                      testcontainers: 1
                    - app-type: ngx-psql-es-noi18n-mapsid
                      entity: sqlfull
                      profile: prod
                      war: 0
                      cypress: 1
                      testcontainers: 0
                    - app-type: ngx-mariadb-oauth2-infinispan
                      entity: sqlfull
                      profile: prod
                      war: 0
                      cypress: 1
                      testcontainers: 0
                    - app-type: ngx-mongodb-kafka-cucumber
                      entity: mongodb
                      profile: dev,webpack
                      war: 0
                      cypress: 1
                      testcontainers: 0
                    - app-type: ngx-h2mem-ws-nol2
                      entity: sql
                      profile: dev,webpack
                      war: 0 # TODO: need change to 1, when maven+war is fixed
                      cypress: 1
                      testcontainers: 0
                    - app-type: ngx-gradle-fr
                      entity: sql
                      profile: prod
                      war: 0
                      cypress: 1
                      testcontainers: 0
                    - app-type: ngx-gradle-psql-es-noi18n-mapsid
                      entity: sqlfull
                      profile: prod
                      war: 0
                      cypress: 1
                      testcontainers: 1
                    - app-type: ngx-gradle-mariadb-oauth2-infinispan
                      entity: sql
                      profile: dev,webpack
                      war: 0
                      cypress: 1
                      testcontainers: 1
                    - app-type: ngx-gradle-mongodb-kafka-cucumber
                      entity: mongodb
                      profile: prod
                      war: 0
                      cypress: 1
                      testcontainers: 0
                    - app-type: ngx-gradle-h2disk-ws-nocache
                      entity: sql
                      profile: dev,webpack
                      war: 1
                      cypress: 1
                      testcontainers: 0
        env:
            JHI_ENTITY: ${{ matrix.entity }}
            JHI_APP: ${{ matrix.app-type }}
            JHI_PROFILE: ${{ matrix.profile }}
            JHI_WAR: ${{ matrix.war }}
            JHI_CYPRESS: ${{ matrix.cypress }}
            JHI_TESTCONTAINERS: ${{ matrix.testcontainers }}
        steps:
            #----------------------------------------------------------------------
            # Install all tools and check configuration
            #----------------------------------------------------------------------
            - uses: actions/checkout@v2
            - uses: actions/setup-node@v2.1.1
              with:
                  node-version: ${{ matrix.node_version }}
            - uses: actions/setup-java@v1
              with:
                  java-version: '11.x'
            - name: Get chrome/chromedriver version
              id: chromedriver-version
              run: |
                  CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \
                  && CHROMEDRIVER_VERSION=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
                  && echo "::set-output name=version::$CHROMEDRIVER_VERSION"
            - name: 'TOOLS: configure tools installed by the system'
              run: $JHI_SCRIPTS/03-system.sh
            - name: 'TOOLS: configure git'
              run: $JHI_SCRIPTS/04-git-config.sh
            #----------------------------------------------------------------------
            # Install JHipster and generate project+entities
            #----------------------------------------------------------------------
            - name: 'GENERATION: install JHipster'
              run: $JHI_SCRIPTS/10-install-jhipster.sh
            - name: 'GENERATION: entities'
              run: $JHI_SCRIPTS/11-generate-entities.sh
            - name: 'GENERATION: project'
              run: $JHI_SCRIPTS/12-generate-project.sh
            - name: 'GENERATION: replace version in generated project'
              run: $JHI_SCRIPTS/13-replace-version-generated-project.sh
            - name: 'GENERATION: jhipster info'
              run: $JHI_SCRIPTS/14-jhipster-info.sh
            #----------------------------------------------------------------------
            # Launch tests
            #----------------------------------------------------------------------
            - name: 'TESTS: Start docker-compose containers'
              run: $JHI_SCRIPTS/20-docker-compose.sh
            - name: 'TESTS: backend'
              run: $JHI_SCRIPTS/21-tests-backend.sh
            - name: 'TESTS: frontend'
              run: $JHI_SCRIPTS/22-tests-frontend.sh
            - name: 'TESTS: packaging'
              run: $JHI_SCRIPTS/23-package.sh
            - name: 'Synchronize chromedriver version'
              if: ${{ matrix.protractor == 1 }}
              run: npm run e2e:update-webdriver --versions.chrome ${{ steps.chromedriver-version.outputs.version }}
              working-directory: /home/runner/app
            - name: 'TESTS: End-to-End'
              run: $JHI_SCRIPTS/24-tests-cypress.sh
            - name: 'TESTS: Sonar analysis'
              run: $JHI_SCRIPTS/25-sonar-analyze.sh
              env:
                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
                  SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

{'fraction_non_alphanumeric': 0.13809225155368038, 'fraction_numerical': 0.012771537715947318, 'mean_word_length': 1.1699863911913893, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '334327', 'n_tokens_mistral': 5026, 'n_tokens_neox': 4657, 'n_words': 988}