From 78679120fdfadf7f33eab6c9762c1a75debed113 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Fri, 5 Apr 2024 12:36:53 +0100 Subject: [PATCH 01/19] CircleCI to Github actions migration for test --- .../install_node_dependencies/action.yml | 22 +++++++ .../install_python_dependencies/action.yml | 15 +++++ .github/workflows/all-checks.yml | 51 ++++++++++++++++ .github/workflows/build-backend.yml | 44 ++++++++++++++ .github/workflows/build-frontend.yml | 21 +++++++ .github/workflows/e2e-tests.yml | 52 ++++++++++++++++ .../workflows/javascript-lint-and-tests.yml | 59 +++++++++++++++++++ .github/workflows/lint.yml | 45 ++++++++++++++ .github/workflows/unit-tests.yml | 52 ++++++++++++++++ 9 files changed, 361 insertions(+) create mode 100644 .github/actions/install_node_dependencies/action.yml create mode 100644 .github/actions/install_python_dependencies/action.yml create mode 100644 .github/workflows/all-checks.yml create mode 100644 .github/workflows/build-backend.yml create mode 100644 .github/workflows/build-frontend.yml create mode 100644 .github/workflows/e2e-tests.yml create mode 100644 .github/workflows/javascript-lint-and-tests.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/actions/install_node_dependencies/action.yml b/.github/actions/install_node_dependencies/action.yml new file mode 100644 index 000000000..2d37f4302 --- /dev/null +++ b/.github/actions/install_node_dependencies/action.yml @@ -0,0 +1,22 @@ +name: Setup Node.js and Install Dependencies +description: Sets up a specific Node.js version, caches Node modules, and installs Node dependencies. + +runs: + using: composite + steps: + - uses: actions/setup-node@v4.0.0 + with: + node-version: 16.13.2 + + - id: npm-cache-dir + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + shell: bash + + - uses: actions/cache@v4 + with: + path: "${{ steps.npm-cache-dir.outputs.dir }}" + key: "${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}" + restore-keys: "${{ runner.os }}-node-" + + - run: npm ci + shell: bash diff --git a/.github/actions/install_python_dependencies/action.yml b/.github/actions/install_python_dependencies/action.yml new file mode 100644 index 000000000..3874ccdc2 --- /dev/null +++ b/.github/actions/install_python_dependencies/action.yml @@ -0,0 +1,15 @@ +name: Install Kedro and other Python Dependencies +description: Installs Kedro from the main branch and other Python dependencies, then prints the Python version and installed packages. +runs: + using: composite + steps: + - name: Install Python dependencies + run: |- + pip install git+https://github.com/kedro-org/kedro@main + pip install -r package/test_requirements.txt -r demo-project/src/docker_requirements.txt -U + shell: bash + - name: Echo package versions + run: |- + python -V + pip freeze + shell: bash \ No newline at end of file diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml new file mode 100644 index 000000000..b47ed8f3a --- /dev/null +++ b/.github/workflows/all-checks.yml @@ -0,0 +1,51 @@ +name: Run all checks on Kedro-Viz +# Runs end-to-end tests, unit tests, linting and JavaScript +# linting & tests on Kedro-Viz for different +# operating systems and Python versions. + +on: + workflow_call: + workflow_dispatch: + schedule: + # Run every day at 1:00 AM(UTC time) + - cron: 0 1 * * * +jobs: + e2e_tests: + strategy: + matrix: + os: [ windows-latest, ubuntu-latest ] + python-version: [ "3.9", "3.10", "3.11" ] + uses: ./.github/workflows/e2e-tests.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + + unit_tests: + strategy: + matrix: + os: [ windows-latest, ubuntu-latest ] + python-version: [ "3.9", "3.10", "3.11" ] + uses: ./.github/workflows/unit-tests.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + + lint: + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: [ "3.9", "3.10", "3.11" ] + uses: ./.github/workflows/lint.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + + javascript_lint_and_tests: + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: [ "3.9" ] + uses: ./.github/workflows/javascript-lint-and-tests.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/build-backend.yml b/.github/workflows/build-backend.yml new file mode 100644 index 000000000..70a869185 --- /dev/null +++ b/.github/workflows/build-backend.yml @@ -0,0 +1,44 @@ +name: Build backend +# Runs end-to-end tests, unit tests, and linting on the backend code +# for different operating systems and Python versions. + +on: + push: + paths: + - 'package/**' + - '.github/**' + pull_request: + paths: + - 'package/**' + - '.github/**' + workflow_dispatch: +jobs: + e2e_tests: + strategy: + matrix: + os: [ windows-latest, ubuntu-latest ] + python-version: [ "3.9", "3.10", "3.11" ] + uses: ./.github/workflows/e2e-tests.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + + unit_tests: + strategy: + matrix: + os: [ windows-latest, ubuntu-latest ] + python-version: [ "3.9", "3.10", "3.11" ] + uses: ./.github/workflows/unit-tests.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} + + lint: + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: [ "3.9", "3.10", "3.11" ] + uses: ./.github/workflows/lint.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml new file mode 100644 index 000000000..172e3c91b --- /dev/null +++ b/.github/workflows/build-frontend.yml @@ -0,0 +1,21 @@ +name: Build frontend +# Runs JavaScript linting & tests on the frontend code for Ubuntu OS and Python 3.9. + +on: + push: + paths-ignore: + - 'package/**' + pull_request: + paths-ignore: + - 'package/**' + workflow_dispatch: +jobs: + javascript_lint_and_tests: + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: [ "3.9" ] + uses: ./.github/workflows/javascript-lint-and-tests.yml + with: + os: ${{ matrix.os }} + python-version: ${{ matrix.python-version }} \ No newline at end of file diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml new file mode 100644 index 000000000..0cb344f68 --- /dev/null +++ b/.github/workflows/e2e-tests.yml @@ -0,0 +1,52 @@ +name: Run e2e tests on Kedro-Viz +# Runs end-to-end tests on Kedro-Viz for different +# operating systems and Python versions. + +on: + workflow_call: + inputs: + os: + type: string + python-version: + type: string +jobs: + e2e_tests: + runs-on: ${{ inputs.os }} + # Only run on main and demo branches for Windows + if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{inputs.python-version}} + uses: actions/setup-python@v5 + with: + python-version: ${{inputs.python-version}} + + - name: Cache python packages for Linux + if: inputs.os == 'ubuntu-latest' + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Cache python packages for Windows + if: inputs.os == 'windows-latest' + uses: actions/cache@v4 + with: + path: ~\AppData\Local\pip\Cache + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Install Kedro and other Python Dependencies + uses: "./.github/actions/install_python_dependencies" + + - name: Setup Node.js and Install Dependencies + uses: "./.github/actions/install_node_dependencies" + + - name: Build React application + run: |- + node -v + make build + + - name: Run Python tests + run: make e2e-tests \ No newline at end of file diff --git a/.github/workflows/javascript-lint-and-tests.yml b/.github/workflows/javascript-lint-and-tests.yml new file mode 100644 index 000000000..70245689e --- /dev/null +++ b/.github/workflows/javascript-lint-and-tests.yml @@ -0,0 +1,59 @@ +name: Run javascript linters and tests on Kedro-Viz +# Runs JavaScript linting, unit tests, and end-to-end tests on +# Kedro-Viz for different operating systems and Python versions. + +on: + workflow_call: + inputs: + os: + type: string + python-version: + type: string +jobs: + javascript_lint_and_tests: + runs-on: ${{ inputs.os }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{inputs.python-version}} + uses: actions/setup-python@v5 + with: + python-version: ${{inputs.python-version}} + + - name: Cache python packages for Linux + if: inputs.os == 'ubuntu-latest' + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Install Kedro and other Python Dependencies + uses: "./.github/actions/install_python_dependencies" + + - name: Setup Node.js and Install Dependencies + uses: "./.github/actions/install_node_dependencies" + + - name: Setup Cypress requirements + run: |- + sudo sed -i 's/archive.ubuntu.com/us-east-1.ec2.archive.ubuntu.com/g' /etc/apt/sources.list + sudo apt-get update + sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb + + - name: Test lib transpilation + run: npm run lib + + - name: Test JS library imports + run: |- + npm run lib-test:setup + cd tools/test-lib/react-app + npm run test:ci + + - name: Run Eslint + run: npm run lint + + - name: Run JavaScript tests + run: npm run test:ci + + - name: Run Javascript end to end tests + run: npm run cy:ci diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 000000000..3bfe309fa --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,45 @@ +name: Run linters on Kedro-Viz +# Runs secret scan, security scan, GraphQL schema check, +# and Python formatters and linters on Kedro-Viz for +# different operating systems and Python versions. + +on: + workflow_call: + inputs: + os: + type: string + python-version: + type: string +jobs: + lint: + runs-on: ${{ inputs.os }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{inputs.python-version}} + uses: actions/setup-python@v5 + with: + python-version: ${{inputs.python-version}} + + - name: Cache python packages for Linux + if: inputs.os == 'ubuntu-latest' + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Install Kedro and other Python Dependencies + uses: "./.github/actions/install_python_dependencies" + + - name: Run secret scan + run: make secret-scan + + - name: Run security scan + run: make security-scan + + - name: Verify GraphQL schema is up to date + run: make schema-check + + - name: Run Python formatters and linters + run: make format-check lint-check diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 000000000..96a7aadc1 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,52 @@ +name: Run unit-tests on Kedro-Viz +# Runs unit tests on Kedro-Viz across different +# OS and Python versions after environment setup. + +on: + workflow_call: + inputs: + os: + type: string + python-version: + type: string +jobs: + unit_tests: + runs-on: ${{ inputs.os }} + # Only run on main and demo branches for Windows + if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{inputs.python-version}} + uses: actions/setup-python@v5 + with: + python-version: ${{inputs.python-version}} + + - name: Cache python packages for Linux + if: inputs.os == 'ubuntu-latest' + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Cache python packages for Windows + if: inputs.os == 'windows-latest' + uses: actions/cache@v4 + with: + path: ~\AppData\Local\pip\Cache + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Install Kedro and other Python Dependencies + uses: "./.github/actions/install_python_dependencies" + + - name: Setup Node.js and Install Dependencies + uses: "./.github/actions/install_node_dependencies" + + - name: Build React application + run: |- + node -v + make build + + - name: Run Python tests + run: make pytest \ No newline at end of file From db418b2635e1b9d80f556bd013909030dd4b866c Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Fri, 5 Apr 2024 22:54:12 +0100 Subject: [PATCH 02/19] trufflehog-ignore updated --- trufflehog-ignore.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trufflehog-ignore.txt b/trufflehog-ignore.txt index da31b5faf..470cd17fc 100644 --- a/trufflehog-ignore.txt +++ b/trufflehog-ignore.txt @@ -7,4 +7,5 @@ README.md LAYOUT_ENGINE.md src/utils/random-utils.js src/components/update-reminder/update-reminder-content.js -src/components/feature-hints/feature-hints-content.js \ No newline at end of file +src/components/feature-hints/feature-hints-content.js +cypress/fixtures/graphql/ \ No newline at end of file From ed927445ab9b1fde92ac922dcc6d5aa3e963700b Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 9 Apr 2024 13:33:56 +0100 Subject: [PATCH 03/19] matrix for js removed --- .github/workflows/all-checks.yml | 7 ------- .github/workflows/javascript-lint-and-tests.yml | 17 ++++++----------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml index b47ed8f3a..4c981d6c8 100644 --- a/.github/workflows/all-checks.yml +++ b/.github/workflows/all-checks.yml @@ -41,11 +41,4 @@ jobs: python-version: ${{ matrix.python-version }} javascript_lint_and_tests: - strategy: - matrix: - os: [ ubuntu-latest ] - python-version: [ "3.9" ] uses: ./.github/workflows/javascript-lint-and-tests.yml - with: - os: ${{ matrix.os }} - python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/javascript-lint-and-tests.yml b/.github/workflows/javascript-lint-and-tests.yml index 70245689e..74d34a356 100644 --- a/.github/workflows/javascript-lint-and-tests.yml +++ b/.github/workflows/javascript-lint-and-tests.yml @@ -1,32 +1,27 @@ name: Run javascript linters and tests on Kedro-Viz # Runs JavaScript linting, unit tests, and end-to-end tests on -# Kedro-Viz for different operating systems and Python versions. +# Kedro-Viz for ubuntu-latest operating systems and Python 3.9. on: workflow_call: - inputs: - os: - type: string - python-version: - type: string + jobs: javascript_lint_and_tests: - runs-on: ${{ inputs.os }} + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 - - name: Set up Python ${{inputs.python-version}} + - name: Set up Python "3.9" uses: actions/setup-python@v5 with: - python-version: ${{inputs.python-version}} + python-version: "3.9" - name: Cache python packages for Linux - if: inputs.os == 'ubuntu-latest' uses: actions/cache@v4 with: path: ~/.cache/pip - key: ${{inputs.os}}-python-${{inputs.python-version}} + key: ubuntu-latest-python-3.9 - name: Install Kedro and other Python Dependencies uses: "./.github/actions/install_python_dependencies" From 94606c562ce46014154de510ed5ecd656b2ed7b2 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 9 Apr 2024 13:38:01 +0100 Subject: [PATCH 04/19] Matrix removed for js in frontend --- .github/workflows/build-frontend.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml index 172e3c91b..53ae2adff 100644 --- a/.github/workflows/build-frontend.yml +++ b/.github/workflows/build-frontend.yml @@ -11,11 +11,4 @@ on: workflow_dispatch: jobs: javascript_lint_and_tests: - strategy: - matrix: - os: [ ubuntu-latest ] - python-version: [ "3.9" ] - uses: ./.github/workflows/javascript-lint-and-tests.yml - with: - os: ${{ matrix.os }} - python-version: ${{ matrix.python-version }} \ No newline at end of file + uses: ./.github/workflows/javascript-lint-and-tests.yml \ No newline at end of file From 4a9ff80687f64bb9a11b54b16eba1e5c41f71e22 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 9 Apr 2024 17:20:09 +0100 Subject: [PATCH 05/19] build-frontend workflow merged with js-lint-test workflow --- .github/workflows/build-frontend.yml | 14 -------------- .github/workflows/javascript-lint-and-tests.yml | 7 +++++++ 2 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 .github/workflows/build-frontend.yml diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml deleted file mode 100644 index 53ae2adff..000000000 --- a/.github/workflows/build-frontend.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Build frontend -# Runs JavaScript linting & tests on the frontend code for Ubuntu OS and Python 3.9. - -on: - push: - paths-ignore: - - 'package/**' - pull_request: - paths-ignore: - - 'package/**' - workflow_dispatch: -jobs: - javascript_lint_and_tests: - uses: ./.github/workflows/javascript-lint-and-tests.yml \ No newline at end of file diff --git a/.github/workflows/javascript-lint-and-tests.yml b/.github/workflows/javascript-lint-and-tests.yml index 74d34a356..94c80dc1e 100644 --- a/.github/workflows/javascript-lint-and-tests.yml +++ b/.github/workflows/javascript-lint-and-tests.yml @@ -3,6 +3,13 @@ name: Run javascript linters and tests on Kedro-Viz # Kedro-Viz for ubuntu-latest operating systems and Python 3.9. on: + push: + paths-ignore: + - 'package/**' + pull_request: + paths-ignore: + - 'package/**' + workflow_dispatch: workflow_call: jobs: From 181e8ce1c03e6435904de0f4cd6a4c47d0095ebd Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 11:57:26 +0100 Subject: [PATCH 06/19] Reusable action for tests created and kept node version and package path as input --- .../install_node_dependencies/action.yml | 15 +++++- .github/actions/setup_tests/action.yml | 51 +++++++++++++++++++ .github/workflows/e2e-tests.yml | 37 ++------------ .../workflows/javascript-lint-and-tests.yml | 2 + .github/workflows/unit-tests.yml | 35 ++----------- 5 files changed, 75 insertions(+), 65 deletions(-) create mode 100644 .github/actions/setup_tests/action.yml diff --git a/.github/actions/install_node_dependencies/action.yml b/.github/actions/install_node_dependencies/action.yml index 2d37f4302..ae9ce15c1 100644 --- a/.github/actions/install_node_dependencies/action.yml +++ b/.github/actions/install_node_dependencies/action.yml @@ -1,12 +1,23 @@ name: Setup Node.js and Install Dependencies description: Sets up a specific Node.js version, caches Node modules, and installs Node dependencies. +inputs: + node-version: + description: 'Node.js version' + required: true + default: '16.13.2' + + package-path: + description: 'Path to package.json file' + required: false + default: '.' + runs: using: composite steps: - uses: actions/setup-node@v4.0.0 with: - node-version: 16.13.2 + node-version: ${{ inputs.node-version }} - id: npm-cache-dir run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT @@ -15,7 +26,7 @@ runs: - uses: actions/cache@v4 with: path: "${{ steps.npm-cache-dir.outputs.dir }}" - key: "${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}" + key: "${{ runner.os }}-node-${{ hashFiles(inputs.package-path + '/package-lock.json') }}" restore-keys: "${{ runner.os }}-node-" - run: npm ci diff --git a/.github/actions/setup_tests/action.yml b/.github/actions/setup_tests/action.yml new file mode 100644 index 000000000..f41ec23ba --- /dev/null +++ b/.github/actions/setup_tests/action.yml @@ -0,0 +1,51 @@ +name: Setup Tests +description: Sets up the testing environment by checking out the code, setting up Python and Node.js, caching Python packages, installing Kedro and other Python dependencies, and building the React application. + +inputs: + os: + description: 'Operating system' + required: true + default: 'ubuntu-latest' + python-version: + description: 'Python version' + required: true + default: '3.9' + +runs: + using: "composite" + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python ${{inputs.python-version}} + uses: actions/setup-python@v5 + with: + python-version: ${{inputs.python-version}} + + - name: Cache python packages for Linux + if: inputs.os == 'ubuntu-latest' + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Cache python packages for Windows + if: inputs.os == 'windows-latest' + uses: actions/cache@v4 + with: + path: ~\AppData\Local\pip\Cache + key: ${{inputs.os}}-python-${{inputs.python-version}} + + - name: Install Kedro and other Python Dependencies + uses: "./.github/actions/install_python_dependencies" + + - name: Setup Node.js and Install Dependencies + uses: "./.github/actions/install_node_dependencies" + with: + node-version: '16.13.2' + + - name: Build React application + run: |- + node -v + make build + shell: bash \ No newline at end of file diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 0cb344f68..c964f0911 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -15,38 +15,11 @@ jobs: # Only run on main and demo branches for Windows if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python ${{inputs.python-version}} - uses: actions/setup-python@v5 - with: - python-version: ${{inputs.python-version}} - - - name: Cache python packages for Linux - if: inputs.os == 'ubuntu-latest' - uses: actions/cache@v4 + - name: Setup Tests + uses: ./.github/actions/setup-tests.yml with: - path: ~/.cache/pip - key: ${{inputs.os}}-python-${{inputs.python-version}} - - - name: Cache python packages for Windows - if: inputs.os == 'windows-latest' - uses: actions/cache@v4 - with: - path: ~\AppData\Local\pip\Cache - key: ${{inputs.os}}-python-${{inputs.python-version}} - - - name: Install Kedro and other Python Dependencies - uses: "./.github/actions/install_python_dependencies" - - - name: Setup Node.js and Install Dependencies - uses: "./.github/actions/install_node_dependencies" - - - name: Build React application - run: |- - node -v - make build + os: ${{ inputs.os }} + python-version: ${{ inputs.python-version }} - - name: Run Python tests + - name: Run all end to end tests run: make e2e-tests \ No newline at end of file diff --git a/.github/workflows/javascript-lint-and-tests.yml b/.github/workflows/javascript-lint-and-tests.yml index 94c80dc1e..4f151f81d 100644 --- a/.github/workflows/javascript-lint-and-tests.yml +++ b/.github/workflows/javascript-lint-and-tests.yml @@ -35,6 +35,8 @@ jobs: - name: Setup Node.js and Install Dependencies uses: "./.github/actions/install_node_dependencies" + with: + node-version: '16.13.2' - name: Setup Cypress requirements run: |- diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 96a7aadc1..98dfd200c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -15,38 +15,11 @@ jobs: # Only run on main and demo branches for Windows if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Python ${{inputs.python-version}} - uses: actions/setup-python@v5 - with: - python-version: ${{inputs.python-version}} - - - name: Cache python packages for Linux - if: inputs.os == 'ubuntu-latest' - uses: actions/cache@v4 + - name: Setup Tests + uses: ./.github/actions/setup-tests.yml with: - path: ~/.cache/pip - key: ${{inputs.os}}-python-${{inputs.python-version}} - - - name: Cache python packages for Windows - if: inputs.os == 'windows-latest' - uses: actions/cache@v4 - with: - path: ~\AppData\Local\pip\Cache - key: ${{inputs.os}}-python-${{inputs.python-version}} - - - name: Install Kedro and other Python Dependencies - uses: "./.github/actions/install_python_dependencies" - - - name: Setup Node.js and Install Dependencies - uses: "./.github/actions/install_node_dependencies" - - - name: Build React application - run: |- - node -v - make build + os: ${{ inputs.os }} + python-version: ${{ inputs.python-version }} - name: Run Python tests run: make pytest \ No newline at end of file From b9a8757ae78b4360bd41e41ef96ac5f39d6b6534 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 12:01:43 +0100 Subject: [PATCH 07/19] action path fix --- .github/workflows/e2e-tests.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index c964f0911..b2dfc459b 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -16,7 +16,7 @@ jobs: if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - name: Setup Tests - uses: ./.github/actions/setup-tests.yml + uses: ./.github/actions/setup-tests/action.yml with: os: ${{ inputs.os }} python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 98dfd200c..959194fea 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -16,7 +16,7 @@ jobs: if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - name: Setup Tests - uses: ./.github/actions/setup-tests.yml + uses: ./.github/actions/setup-tests/action.yml with: os: ${{ inputs.os }} python-version: ${{ inputs.python-version }} From ace836261eec8ce8002687f01eeca7323b338e0b Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 12:06:54 +0100 Subject: [PATCH 08/19] Action path fix in workflow --- .github/workflows/e2e-tests.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index b2dfc459b..53c0c4841 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -16,7 +16,7 @@ jobs: if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - name: Setup Tests - uses: ./.github/actions/setup-tests/action.yml + uses: "./.github/actions/setup-tests" with: os: ${{ inputs.os }} python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 959194fea..712ff8a65 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -16,7 +16,7 @@ jobs: if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - name: Setup Tests - uses: ./.github/actions/setup-tests/action.yml + uses: "./.github/actions/setup-tests" with: os: ${{ inputs.os }} python-version: ${{ inputs.python-version }} From c173949e30ac3ee37c69dcd0bac2b5ad5390736c Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 12:10:40 +0100 Subject: [PATCH 09/19] action file correction setup_tests --- .github/workflows/e2e-tests.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 53c0c4841..f944c7058 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -16,7 +16,7 @@ jobs: if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - name: Setup Tests - uses: "./.github/actions/setup-tests" + uses: "./.github/actions/setup_tests" with: os: ${{ inputs.os }} python-version: ${{ inputs.python-version }} diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 712ff8a65..a28e72237 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -16,7 +16,7 @@ jobs: if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: - name: Setup Tests - uses: "./.github/actions/setup-tests" + uses: "./.github/actions/setup_tests" with: os: ${{ inputs.os }} python-version: ${{ inputs.python-version }} From 407a1a0a7a7894e8d0048e7f8cb3a8f40518a634 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 12:30:24 +0100 Subject: [PATCH 10/19] checkout moved from actions --- .github/actions/setup_tests/action.yml | 3 --- .github/workflows/e2e-tests.yml | 3 +++ .github/workflows/unit-tests.yml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup_tests/action.yml b/.github/actions/setup_tests/action.yml index f41ec23ba..cfa979580 100644 --- a/.github/actions/setup_tests/action.yml +++ b/.github/actions/setup_tests/action.yml @@ -14,9 +14,6 @@ inputs: runs: using: "composite" steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up Python ${{inputs.python-version}} uses: actions/setup-python@v5 with: diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index f944c7058..dadf870f5 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -15,6 +15,9 @@ jobs: # Only run on main and demo branches for Windows if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Tests uses: "./.github/actions/setup_tests" with: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index a28e72237..7a5bd735c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -15,6 +15,9 @@ jobs: # Only run on main and demo branches for Windows if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Setup Tests uses: "./.github/actions/setup_tests" with: From 708d0fbe6bfc42493af5aec7f8e9ae07a65fbd16 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 13:03:47 +0100 Subject: [PATCH 11/19] hashFiles format added --- .../actions/install_node_dependencies/action.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/actions/install_node_dependencies/action.yml b/.github/actions/install_node_dependencies/action.yml index ae9ce15c1..9d89f6ead 100644 --- a/.github/actions/install_node_dependencies/action.yml +++ b/.github/actions/install_node_dependencies/action.yml @@ -15,19 +15,23 @@ inputs: runs: using: composite steps: - - uses: actions/setup-node@v4.0.0 + - name: Setup Node.js + uses: actions/setup-node@v4.0.0 with: node-version: ${{ inputs.node-version }} - - id: npm-cache-dir + - name: Get NPM Cache Directory + id: npm-cache-dir run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT shell: bash - - uses: actions/cache@v4 + - name: Cache Node.js packages + uses: actions/cache@v2 with: path: "${{ steps.npm-cache-dir.outputs.dir }}" - key: "${{ runner.os }}-node-${{ hashFiles(inputs.package-path + '/package-lock.json') }}" + key: "${{ runner.os }}-node-${{ hashFiles(format('{0}/package-lock.json', inputs.package-path)) }}" restore-keys: "${{ runner.os }}-node-" - - run: npm ci + - name: Install Node Dependencies + run: npm ci shell: bash From f3001c71f9d792f73850279794c98ae67b989f55 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 18:19:34 +0100 Subject: [PATCH 12/19] name updated to install_kedro_and_python_dependencies --- .../action.yml | 0 .github/actions/setup_tests/action.yml | 4 ++-- .github/workflows/javascript-lint-and-tests.yml | 2 +- .github/workflows/lint.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename .github/actions/{install_python_dependencies => install_kedro_and_python_dependencies}/action.yml (100%) diff --git a/.github/actions/install_python_dependencies/action.yml b/.github/actions/install_kedro_and_python_dependencies/action.yml similarity index 100% rename from .github/actions/install_python_dependencies/action.yml rename to .github/actions/install_kedro_and_python_dependencies/action.yml diff --git a/.github/actions/setup_tests/action.yml b/.github/actions/setup_tests/action.yml index cfa979580..713524292 100644 --- a/.github/actions/setup_tests/action.yml +++ b/.github/actions/setup_tests/action.yml @@ -1,5 +1,5 @@ name: Setup Tests -description: Sets up the testing environment by checking out the code, setting up Python and Node.js, caching Python packages, installing Kedro and other Python dependencies, and building the React application. +description: Sets up the testing environment by setting up Python and Node.js, caching Python packages, installing Kedro and other Python dependencies, and building the React application. inputs: os: @@ -34,7 +34,7 @@ runs: key: ${{inputs.os}}-python-${{inputs.python-version}} - name: Install Kedro and other Python Dependencies - uses: "./.github/actions/install_python_dependencies" + uses: "./.github/actions/install_kedro_and_python_dependencies" - name: Setup Node.js and Install Dependencies uses: "./.github/actions/install_node_dependencies" diff --git a/.github/workflows/javascript-lint-and-tests.yml b/.github/workflows/javascript-lint-and-tests.yml index 4f151f81d..7077e7568 100644 --- a/.github/workflows/javascript-lint-and-tests.yml +++ b/.github/workflows/javascript-lint-and-tests.yml @@ -31,7 +31,7 @@ jobs: key: ubuntu-latest-python-3.9 - name: Install Kedro and other Python Dependencies - uses: "./.github/actions/install_python_dependencies" + uses: "./.github/actions/install_kedro_and_python_dependencies" - name: Setup Node.js and Install Dependencies uses: "./.github/actions/install_node_dependencies" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3bfe309fa..02489d36d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -30,7 +30,7 @@ jobs: key: ${{inputs.os}}-python-${{inputs.python-version}} - name: Install Kedro and other Python Dependencies - uses: "./.github/actions/install_python_dependencies" + uses: "./.github/actions/install_kedro_and_python_dependencies" - name: Run secret scan run: make secret-scan From da8b24e821f48f75ec5318067ba3e45bd8e5ebbf Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Thu, 11 Apr 2024 21:03:29 +0100 Subject: [PATCH 13/19] Condition for PR to main with windows updated --- .github/workflows/e2e-tests.yml | 21 +++++++++++++++++++-- .github/workflows/unit-tests.yml | 21 +++++++++++++++++++-- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index dadf870f5..3a77d9516 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -12,8 +12,25 @@ on: jobs: e2e_tests: runs-on: ${{ inputs.os }} - # Only run on main and demo branches for Windows - if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') + + # below condition checks if the operating system is Ubuntu, or + # Run on Windows and + # main/demo branch or + # pull request to main with Python 3.10 + if: > + inputs.os == 'ubuntu-latest' || + ( + ( + github.ref == 'refs/heads/main' || + github.ref == 'refs/heads/demo' || + ( + github.event.pull_request.base.ref == 'main' && + inputs.python-version == '3.10' + ) + ) && + inputs.os == 'windows-latest' + ) + steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7a5bd735c..23e74bae1 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -12,8 +12,25 @@ on: jobs: unit_tests: runs-on: ${{ inputs.os }} - # Only run on main and demo branches for Windows - if: inputs.os == 'ubuntu-latest' || ((github.ref == 'refs/heads/main' || github.ref == 'refs/heads/demo') && inputs.os == 'windows-latest') + + # below condition checks if the operating system is Ubuntu, or + # Run on Windows and + # main/demo branch or + # pull request to main with Python 3.10 + if: > + inputs.os == 'ubuntu-latest' || + ( + ( + github.ref == 'refs/heads/main' || + github.ref == 'refs/heads/demo' || + ( + github.event.pull_request.base.ref == 'main' && + inputs.python-version == '3.10' + ) + ) && + inputs.os == 'windows-latest' + ) + steps: - name: Checkout code uses: actions/checkout@v4 From 7a38acae6f9da5f6f43958ac2956673a6b549d0d Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Fri, 12 Apr 2024 10:19:07 +0100 Subject: [PATCH 14/19] Code review fix added --- .github/actions/install_node_dependencies/action.yml | 2 +- .github/actions/setup_tests/action.yml | 6 ++---- .github/workflows/javascript-lint-and-tests.yml | 2 -- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/actions/install_node_dependencies/action.yml b/.github/actions/install_node_dependencies/action.yml index 9d89f6ead..5b678ab24 100644 --- a/.github/actions/install_node_dependencies/action.yml +++ b/.github/actions/install_node_dependencies/action.yml @@ -4,7 +4,7 @@ description: Sets up a specific Node.js version, caches Node modules, and instal inputs: node-version: description: 'Node.js version' - required: true + required: false default: '16.13.2' package-path: diff --git a/.github/actions/setup_tests/action.yml b/.github/actions/setup_tests/action.yml index 713524292..4de29e785 100644 --- a/.github/actions/setup_tests/action.yml +++ b/.github/actions/setup_tests/action.yml @@ -4,11 +4,11 @@ description: Sets up the testing environment by setting up Python and Node.js, c inputs: os: description: 'Operating system' - required: true + required: false default: 'ubuntu-latest' python-version: description: 'Python version' - required: true + required: false default: '3.9' runs: @@ -38,8 +38,6 @@ runs: - name: Setup Node.js and Install Dependencies uses: "./.github/actions/install_node_dependencies" - with: - node-version: '16.13.2' - name: Build React application run: |- diff --git a/.github/workflows/javascript-lint-and-tests.yml b/.github/workflows/javascript-lint-and-tests.yml index 7077e7568..0cff820c9 100644 --- a/.github/workflows/javascript-lint-and-tests.yml +++ b/.github/workflows/javascript-lint-and-tests.yml @@ -35,8 +35,6 @@ jobs: - name: Setup Node.js and Install Dependencies uses: "./.github/actions/install_node_dependencies" - with: - node-version: '16.13.2' - name: Setup Cypress requirements run: |- From db942b7c5e089763085dc6f9a4414a29d54f1ca3 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 16 Apr 2024 09:42:54 +0100 Subject: [PATCH 15/19] Merge Gatekeeper added Signed-off-by: Jitendra Gundaniya --- .github/workflows/merge-gatekeeper.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/merge-gatekeeper.yml diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml new file mode 100644 index 000000000..2efed8457 --- /dev/null +++ b/.github/workflows/merge-gatekeeper.yml @@ -0,0 +1,26 @@ +name: Merge Gatekeeper + +on: + pull_request: + branches: + - main + +jobs: + merge-gatekeeper: + runs-on: ubuntu-latest + # Restrict permissions of the GITHUB_TOKEN. + # Docs: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs + permissions: + checks: read + statuses: read + steps: + - name: Run Merge Gatekeeper + # NOTE: v1 is updated to reflect the latest v1.x.y. Please use any tag/branch that suits your needs: + # https://github.com/upsidr/merge-gatekeeper/tags + # https://github.com/upsidr/merge-gatekeeper/branches + uses: upsidr/merge-gatekeeper@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + timeout: 3600 + interval: 30 + ignored: 'CircleCI Pipeline' \ No newline at end of file From a4e043e3dc7c1386579f3564e7ab87ce84f3e738 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 16 Apr 2024 10:39:07 +0100 Subject: [PATCH 16/19] All CircleCI Pipeline name added to ignore list. Signed-off-by: Jitendra Gundaniya --- .github/workflows/merge-gatekeeper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml index 2efed8457..e3fb12a47 100644 --- a/.github/workflows/merge-gatekeeper.yml +++ b/.github/workflows/merge-gatekeeper.yml @@ -23,4 +23,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} timeout: 3600 interval: 30 - ignored: 'CircleCI Pipeline' \ No newline at end of file + ignored: 'ci/circleci: win_unit_tests-3.9,ci/circleci: win_unit_tests-3.10,ci/circleci: win_unit_tests-3.8,ci/circleci: unit_tests-3.10,ci/circleci: unit_tests-3.8,ci/circleci: unit_tests-3.9,ci/circleci: win_e2e_tests-3.10,ci/circleci: win_e2e_tests-3.9,ci/circleci: win_e2e_tests-3.8,ci/circleci: e2e_tests-3.8,ci/circleci: e2e_tests-3.9,ci/circleci: e2e_tests-3.10,ci/circleci: lint-3.8,ci/circleci: lint-3.9,ci/circleci: lint-3.10,ci/circleci: javascript_lint_and_tests,ci/circlecici: check-updated-files,ci/circleci: all_circleci_checks_succeeded' \ No newline at end of file From 316c237834169902e0e68fefa4eb95145bf1735c Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 16 Apr 2024 10:43:48 +0100 Subject: [PATCH 17/19] ci/circleci pipeline renamed --- .github/workflows/merge-gatekeeper.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge-gatekeeper.yml b/.github/workflows/merge-gatekeeper.yml index e3fb12a47..abc5c013f 100644 --- a/.github/workflows/merge-gatekeeper.yml +++ b/.github/workflows/merge-gatekeeper.yml @@ -23,4 +23,4 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} timeout: 3600 interval: 30 - ignored: 'ci/circleci: win_unit_tests-3.9,ci/circleci: win_unit_tests-3.10,ci/circleci: win_unit_tests-3.8,ci/circleci: unit_tests-3.10,ci/circleci: unit_tests-3.8,ci/circleci: unit_tests-3.9,ci/circleci: win_e2e_tests-3.10,ci/circleci: win_e2e_tests-3.9,ci/circleci: win_e2e_tests-3.8,ci/circleci: e2e_tests-3.8,ci/circleci: e2e_tests-3.9,ci/circleci: e2e_tests-3.10,ci/circleci: lint-3.8,ci/circleci: lint-3.9,ci/circleci: lint-3.10,ci/circleci: javascript_lint_and_tests,ci/circlecici: check-updated-files,ci/circleci: all_circleci_checks_succeeded' \ No newline at end of file + ignored: 'ci/circleci: win_unit_tests-3.9,ci/circleci: win_unit_tests-3.10,ci/circleci: win_unit_tests-3.8,ci/circleci: unit_tests-3.10,ci/circleci: unit_tests-3.8,ci/circleci: unit_tests-3.9,ci/circleci: win_e2e_tests-3.10,ci/circleci: win_e2e_tests-3.9,ci/circleci: win_e2e_tests-3.8,ci/circleci: e2e_tests-3.8,ci/circleci: e2e_tests-3.9,ci/circleci: e2e_tests-3.10,ci/circleci: lint-3.8,ci/circleci: lint-3.9,ci/circleci: lint-3.10,ci/circleci: javascript_lint_and_tests,ci/circleci: check-updated-files,ci/circleci: all_circleci_checks_succeeded' \ No newline at end of file From 01ab12187b0560cff667b77b89f80583cd0a75c1 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 16 Apr 2024 16:36:36 +0100 Subject: [PATCH 18/19] Node version updated Signed-off-by: Jitendra Gundaniya --- .github/actions/install_node_dependencies/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install_node_dependencies/action.yml b/.github/actions/install_node_dependencies/action.yml index 5b678ab24..c80b6cf6a 100644 --- a/.github/actions/install_node_dependencies/action.yml +++ b/.github/actions/install_node_dependencies/action.yml @@ -5,7 +5,7 @@ inputs: node-version: description: 'Node.js version' required: false - default: '16.13.2' + default: '18.20.0' package-path: description: 'Path to package.json file' From 5a3dba605288fd21c858a0b0b178b0ab857d9684 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Tue, 16 Apr 2024 17:12:42 +0100 Subject: [PATCH 19/19] Windows run for PR to main is updated Signed-off-by: Jitendra Gundaniya --- .github/actions/install_node_dependencies/action.yml | 2 +- .github/workflows/e2e-tests.yml | 10 ++-------- .github/workflows/unit-tests.yml | 10 ++-------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/.github/actions/install_node_dependencies/action.yml b/.github/actions/install_node_dependencies/action.yml index c80b6cf6a..b36a41e83 100644 --- a/.github/actions/install_node_dependencies/action.yml +++ b/.github/actions/install_node_dependencies/action.yml @@ -33,5 +33,5 @@ runs: restore-keys: "${{ runner.os }}-node-" - name: Install Node Dependencies - run: npm ci + run: npm install shell: bash diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 3a77d9516..5eee3d98c 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -14,19 +14,13 @@ jobs: runs-on: ${{ inputs.os }} # below condition checks if the operating system is Ubuntu, or - # Run on Windows and - # main/demo branch or - # pull request to main with Python 3.10 + # if the operating system is Windows and the branch is main/demo if: > inputs.os == 'ubuntu-latest' || ( ( github.ref == 'refs/heads/main' || - github.ref == 'refs/heads/demo' || - ( - github.event.pull_request.base.ref == 'main' && - inputs.python-version == '3.10' - ) + github.ref == 'refs/heads/demo' ) && inputs.os == 'windows-latest' ) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 23e74bae1..fe970683c 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -14,19 +14,13 @@ jobs: runs-on: ${{ inputs.os }} # below condition checks if the operating system is Ubuntu, or - # Run on Windows and - # main/demo branch or - # pull request to main with Python 3.10 + # if the operating system is Windows and the branch is main/demo if: > inputs.os == 'ubuntu-latest' || ( ( github.ref == 'refs/heads/main' || - github.ref == 'refs/heads/demo' || - ( - github.event.pull_request.base.ref == 'main' && - inputs.python-version == '3.10' - ) + github.ref == 'refs/heads/demo' ) && inputs.os == 'windows-latest' )