From 21dd294f719f92b4e92d8f0ccfdc10a544a89364 Mon Sep 17 00:00:00 2001 From: Tiago Bento Date: Tue, 5 Dec 2023 19:03:19 -0500 Subject: [PATCH] Testing google-chrome --- .github/workflows/ci_build.yml | 179 +---------------------- .github/workflows/test-google-chrome.yml | 54 ------- 2 files changed, 5 insertions(+), 228 deletions(-) delete mode 100644 .github/workflows/test-google-chrome.yml diff --git a/.github/workflows/ci_build.yml b/.github/workflows/ci_build.yml index 33f65a21f7f..0b479fad4e3 100644 --- a/.github/workflows/ci_build.yml +++ b/.github/workflows/ci_build.yml @@ -85,184 +85,15 @@ jobs: PLAYWRIGHT_BASE__installDeps: "true" uses: ./.github/actions/bootstrap - - name: "FULL → Build (without some images)" - if: steps.setup_build_mode.outputs.mode == 'full' - env: - WEBPACK__minimize: "false" - WEBPACK__tsLoaderTranspileOnly: "false" - KIE_TOOLS_BUILD__runLinters: "true" - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: ${{ runner.os == 'Linux' }} - KIE_TOOLS_BUILD__buildContainerImages: ${{ runner.os != 'Windows' }} - KIE_TOOLS_BUILD__buildExamples: "true" - KIE_TOOLS_BUILD__ignoreTestFailures: ${{ !github.event.pull_request }} - KIE_TOOLS_BUILD__ignoreEndToEndTestFailures: ${{ !github.event.pull_request }} - DISPLAY: ":99.0" - START_SERVER_AND_TEST_INSECURE: "true" - NODE_OPTIONS: "--max_old_space_size=4096" - run: >- - pnpm - -F='!@kie-tools/serverless-logic-web-tools-swf-dev-mode-image' - -F='!@kie-tools/dmn-dev-deployment-base-image' - -F='!@kie-tools/serverless-logic-web-tools-base-builder-image' - -F='!@kie-tools/dashbuilder-viewer-image' - -r --workspace-concurrency=1 build:prod - - - name: "FULL → Build → serverless-logic-web-tools-swf-dev-mode-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/serverless-logic-web-tools-swf-dev-mode-image" - pnpm -F @kie-tools/serverless-logic-web-tools-swf-dev-mode-image... --workspace-concurrency=1 build:prod - - - name: "FULL → Build → dmn-dev-deployment-base-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/dmn-dev-deployment-base-image" - pnpm -F @kie-tools/dmn-dev-deployment-base-image... --workspace-concurrency=1 build:prod - - - name: "FULL → Build → serverless-logic-web-tools-base-builder-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/serverless-logic-web-tools-base-builder-image" - pnpm -F @kie-tools/serverless-logic-web-tools-base-builder-image... --workspace-concurrency=1 build:prod - - - name: "FULL → Build → dashbuilder-viewer-image" - if: steps.setup_build_mode.outputs.mode == 'full' && runner.os == 'Linux' - env: - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: "true" - KIE_TOOLS_BUILD__buildContainerImages: "true" - run: | - echo "Clean up container image resources" - if command -v docker &> /dev/null; then - docker system prune -af - fi - if command -v podman &> /dev/null; then - podman system prune --all --force - fi - echo "Build @kie-tools/dashbuilder-viewer-image" - pnpm -F @kie-tools/dashbuilder-viewer-image... --workspace-concurrency=1 build:prod - - - name: "PARTIAL → Bootstrap" - if: steps.setup_build_mode.outputs.mode == 'partial' - env: - PLAYWRIGHT_BASE__installDeps: "true" - uses: ./.github/actions/bootstrap - with: - pnpm_filter_string: -F "...[${{ steps.checkout_pr.outputs.base_sha }}]..." - - - name: "PARTIAL → Build dependencies" - if: steps.setup_build_mode.outputs.mode == 'partial' - shell: bash - env: - KIE_TOOLS_BUILD__buildContainerImages: ${{ runner.os != 'Windows' }} - KIE_TOOLS_BUILD__buildExamples: "true" - run: | - export ALL_DEPENDENCIES_FILTER=$(pnpm -F="...[${{ steps.checkout_pr.outputs.base_sha }}]" exec bash -c 'echo -n " -F=$(jq --raw-output .name package.json)^..."') - export CHANGED_PKGS_EXCLUSION_FILTER=$(pnpm -F="...[${{ steps.checkout_pr.outputs.base_sha }}]" exec bash -c 'echo -n " -F='"'"'!$(jq --raw-output .name package.json)'"'"'"') - echo $ALL_DEPENDENCIES_FILTER - echo $CHANGED_PKGS_EXCLUSION_FILTER - eval "pnpm $ALL_DEPENDENCIES_FILTER $CHANGED_PKGS_EXCLUSION_FILTER build:dev" - - - name: "PARTIAL → Build changed and dependents" - if: steps.setup_build_mode.outputs.mode == 'partial' + - name: "Try google-chrome" env: - WEBPACK__minimize: "false" - KIE_TOOLS_BUILD__runLinters: "true" - KIE_TOOLS_BUILD__runTests: "true" - KIE_TOOLS_BUILD__runEndToEndTests: ${{ runner.os == 'Linux' }} - KIE_TOOLS_BUILD__buildContainerImages: ${{ runner.os != 'Windows' }} - KIE_TOOLS_BUILD__buildExamples: "true" DISPLAY: ":99.0" - START_SERVER_AND_TEST_INSECURE: "true" - NODE_OPTIONS: "--max_old_space_size=4096" - run: | - pnpm -F "...[${{ steps.checkout_pr.outputs.base_sha }}]" --workspace-concurrency=1 build:prod - - - name: "Check tests result (`main` only)" - if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' - uses: actions/github-script@v6 - env: - KIE_TOOLS_CI__JUNIT_REPORT_RESULTS_PATTERNS: |- - ${{ steps.ci_patterns.outputs.tests_reports_patterns }} - ${{ steps.ci_patterns.outputs.end_to_end_tests_reports_patterns }} - with: - result-encoding: string - script: | - const patterns = process.env["KIE_TOOLS_CI__JUNIT_REPORT_RESULTS_PATTERNS"] - .split("\n") - .map(p => p.trim()) - .filter(p => p); - - const script = require("./scripts/check-junit-report-results/src/index.js"); - await script({ core, glob, patterns }); - - - name: "Check hanging uncommitted files (you should commit those!)" - if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' shell: bash run: | - git diff - [ "0" == "$(git diff | wc -l | tr -d ' ')" ] - - - name: "Upload reports and artifacts" - if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' - uses: ./.github/actions/upload-ci-reports-and-artifacts - - - name: "Upload end-to-end tests results to Buildkite (`main` only)" - if: always() && !cancelled() && steps.setup_build_mode.outputs.mode != 'none' && !github.event.pull_request - shell: bash - env: - BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_TOKEN }} - BUILDKITE_BRANCH: ${{ github.ref_name }} - BUILDKITE_MESSAGE: ${{ github.event.commits[0].message }} - run: | - eval "find -P * -type f ${{ steps.ci_patterns.outputs.end_to_end_tests_reports_patterns_for_find }}" - echo "---------------------------- starting upload -----------------------" - eval "find -P * -type f ${{ steps.ci_patterns.outputs.end_to_end_tests_reports_patterns_for_find }}" | xargs -I{} curl -X POST \ - -H "Authorization: Token token=\"$BUILDKITE_ANALYTICS_TOKEN\"" \ - -F "format=junit" \ - -F "data=@{}" \ - -F "run_env[CI]=github_actions" \ - -F "run_env[key]=$GITHUB_ACTION-$GITHUB_RUN_NUMBER-$GITHUB_RUN_ATTEMPT" \ - -F "run_env[number]=$GITHUB_RUN_NUMBER" \ - -F "run_env[branch]=$BUILDKITE_BRANCH" \ - -F "run_env[commit_sha]=$GITHUB_SHA" \ - -F "run_env[message]=$BUILDKITE_MESSAGE" \ - -F "run_env[url]=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" \ - https://analytics-api.buildkite.com/v1/uploads + google-chrome --enable-features=UnexpireFlagsM118 --allow-insecure-localhost & + sleep 20 + kill $(pgrep chrome) + exit 0 - name: "Print storage usage (after build)" if: always() && !cancelled() diff --git a/.github/workflows/test-google-chrome.yml b/.github/workflows/test-google-chrome.yml deleted file mode 100644 index 3494de14fa5..00000000000 --- a/.github/workflows/test-google-chrome.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: "Testing Google Chrome" -on: - push: - branches: [main] -jobs: - run: - strategy: - fail-fast: false - runs-on: ubuntu-latest - steps: - - name: "Install Fluxbox (Ubuntu only)" - shell: bash - run: | - echo "STEP: Install Fluxbox (Ubuntu only)" - cd ${{ inputs.working_dir }} - if [ "${{ runner.os }}" == "Linux" ]; then - sudo apt-get -y install fluxbox > /dev/null 2>&1 - fi - - - name: "Start Xvfb (Ubuntu only)" - shell: bash - run: | - echo "STEP: Start Xvfb (Ubuntu only)" - cd ${{ inputs.working_dir }} - if [ "${{ runner.os }}" == "Linux" ]; then - /usr/bin/Xvfb :99 -screen 0 1920x1080x24 > /dev/null 2>&1 & - fi - - - name: "Start Fluxbox (Ubuntu only)" - shell: bash - run: | - echo "STEP: Start Fluxbox (Ubuntu only)" - cd ${{ inputs.working_dir }} - if [ "${{ runner.os }}" == "Linux" ]; then - fluxbox -display :99 > /dev/null 2>&1 & - fi - - - name: "Increase inotify watches (Ubuntu only)" - shell: bash - run: | - echo "STEP: Increase inotify watches (Ubuntu only)" - cd ${{ inputs.working_dir }} - if [ "${{ runner.os }}" == "Linux" ]; then - echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - fi - - - name: "Try google-chrome" - shell: bash - run: | - export DISPLAY=:99 - google-chrome --enable-features=UnexpireFlagsM118 --allow-insecure-localhost & - sleep 20 - kill $(pgrep google-chrome) - exit 0