From f7434a17adebcf637793cba230b6799aff72f73a Mon Sep 17 00:00:00 2001 From: Edoardo Paganoni Date: Tue, 22 Oct 2024 13:42:37 +0000 Subject: [PATCH] Add public tests for matlab-deps --- .../build-test-and-publish-matlab/action.yml | 6 +- .github/workflows/README.md | 4 +- ...d-test-and-publish-dependencies-image.yml} | 90 +++++++++++++------ .../matlab-deps-r2019b-aws-batch.yml | 13 +-- .../matlab-deps-r2019b-ubuntu18.04.yml | 13 +-- .../matlab-deps-r2020a-aws-batch.yml | 13 +-- .../matlab-deps-r2020a-ubuntu18.04.yml | 13 +-- .../matlab-deps-r2020b-aws-batch.yml | 13 +-- .../matlab-deps-r2020b-ubuntu20.04.yml | 13 +-- .../matlab-deps-r2021a-aws-batch.yml | 13 +-- .../matlab-deps-r2021a-ubuntu20.04.yml | 13 +-- .../matlab-deps-r2021b-aws-batch.yml | 13 +-- .github/workflows/matlab-deps-r2021b-ubi8.yml | 13 +-- .../matlab-deps-r2021b-ubuntu20.04.yml | 13 +-- .../matlab-deps-r2022a-aws-batch.yml | 13 +-- .github/workflows/matlab-deps-r2022a-ubi8.yml | 13 +-- .../matlab-deps-r2022a-ubuntu20.04.yml | 13 +-- .../matlab-deps-r2022b-aws-batch.yml | 13 +-- .github/workflows/matlab-deps-r2022b-ubi8.yml | 13 +-- .github/workflows/matlab-deps-r2022b-ubi9.yml | 13 +-- .../matlab-deps-r2022b-ubuntu20.04.yml | 13 +-- .../matlab-deps-r2022b-ubuntu22.04.yml | 13 +-- .../matlab-deps-r2023a-aws-batch.yml | 13 +-- .github/workflows/matlab-deps-r2023a-ubi8.yml | 13 +-- .github/workflows/matlab-deps-r2023a-ubi9.yml | 13 +-- .../matlab-deps-r2023a-ubuntu20.04.yml | 13 +-- .../matlab-deps-r2023a-ubuntu22.04.yml | 13 +-- .../matlab-deps-r2023b-aws-batch.yml | 13 +-- .github/workflows/matlab-deps-r2023b-ubi8.yml | 13 +-- .github/workflows/matlab-deps-r2023b-ubi9.yml | 13 +-- .../matlab-deps-r2023b-ubuntu20.04.yml | 13 +-- .../matlab-deps-r2023b-ubuntu22.04.yml | 13 +-- .../matlab-deps-r2024a-aws-batch.yml | 11 ++- .github/workflows/matlab-deps-r2024a-ubi8.yml | 11 ++- .github/workflows/matlab-deps-r2024a-ubi9.yml | 11 ++- .../matlab-deps-r2024a-ubuntu20.04.yml | 11 ++- .../matlab-deps-r2024a-ubuntu22.04.yml | 11 ++- .../matlab-deps-r2024b-aws-batch.yml | 13 +-- .github/workflows/matlab-deps-r2024b-ubi8.yml | 12 ++- .github/workflows/matlab-deps-r2024b-ubi9.yml | 12 ++- .../matlab-deps-r2024b-ubuntu20.04.yml | 12 ++- .../matlab-deps-r2024b-ubuntu22.04.yml | 12 ++- .../matlab-deps-r2024b-ubuntu24.04.yml | 7 +- ...matlab-runtime-deps-r2023b-ubuntu22.04.yml | 6 +- ...matlab-runtime-deps-r2024a-ubuntu22.04.yml | 4 +- .../polyspace-deps-r2022b-ubuntu20.04.yml | 6 +- .../polyspace-deps-r2023a-ubuntu20.04.yml | 6 +- .../polyspace-deps-r2023b-ubuntu22.04.yml | 6 +- .../r2020b/aws-batch/base-dependencies.txt | 2 +- matlab-deps/r2022a/ubi8/Dockerfile | 5 +- tests/matlab-deps/.gitignore | 2 + .../pytools => matlab-deps}/__init__.py | 0 tests/matlab-deps/test_awsbatch.py | 88 ++++++++++++++++++ tests/matlab-deps/test_ubi8.py | 24 +++++ tests/matlab-deps/test_ubi9.py | 24 +++++ tests/matlab-deps/test_ubuntu1804.py | 24 +++++ tests/matlab-deps/test_ubuntu2004.py | 37 ++++++++ tests/matlab-deps/test_ubuntu2204.py | 26 ++++++ tests/matlab-deps/test_ubuntu2404.py | 26 ++++++ tests/matlab-deps/utils/__init__.py | 0 tests/matlab-deps/utils/base.py | 67 ++++++++++++++ tests/matlab-deps/utils/release_platform.py | 74 +++++++++++++++ tests/matlab-deps/utils/test_ubi.py | 47 ++++++++++ tests/matlab-deps/utils/test_ubuntu.py | 43 +++++++++ tests/matlab/matlab/test_ddux.py | 2 +- .../matlab/matlab_deep_learning/test_ddux.py | 2 +- .../shared/test_matlab_proxy_integration.py | 6 +- tests/matlab/test_matlab-deep-learning.py | 18 ++-- tests/matlab/test_matlab.py | 16 ++-- tests/pytools/__init__.py | 0 tests/{matlab => }/pytools/dockertool.py | 0 tests/{matlab => }/pytools/helper.py | 25 ++++-- .../pytools/test_suite_launcher.py | 0 tests/{matlab => }/requirements.txt | 0 74 files changed, 927 insertions(+), 259 deletions(-) rename .github/workflows/{build-and-publish-docker-image.yml => build-test-and-publish-dependencies-image.yml} (68%) create mode 100644 tests/matlab-deps/.gitignore rename tests/{matlab/pytools => matlab-deps}/__init__.py (100%) create mode 100644 tests/matlab-deps/test_awsbatch.py create mode 100644 tests/matlab-deps/test_ubi8.py create mode 100644 tests/matlab-deps/test_ubi9.py create mode 100644 tests/matlab-deps/test_ubuntu1804.py create mode 100644 tests/matlab-deps/test_ubuntu2004.py create mode 100644 tests/matlab-deps/test_ubuntu2204.py create mode 100644 tests/matlab-deps/test_ubuntu2404.py create mode 100644 tests/matlab-deps/utils/__init__.py create mode 100644 tests/matlab-deps/utils/base.py create mode 100644 tests/matlab-deps/utils/release_platform.py create mode 100644 tests/matlab-deps/utils/test_ubi.py create mode 100644 tests/matlab-deps/utils/test_ubuntu.py create mode 100644 tests/pytools/__init__.py rename tests/{matlab => }/pytools/dockertool.py (100%) rename tests/{matlab => }/pytools/helper.py (93%) rename tests/{matlab => }/pytools/test_suite_launcher.py (100%) rename tests/{matlab => }/requirements.txt (100%) diff --git a/.github/actions/build-test-and-publish-matlab/action.yml b/.github/actions/build-test-and-publish-matlab/action.yml index 90b8382..2c5eb2f 100644 --- a/.github/actions/build-test-and-publish-matlab/action.yml +++ b/.github/actions/build-test-and-publish-matlab/action.yml @@ -15,7 +15,7 @@ inputs: required: true test_dir: required: false - default: "./tests/matlab" + default: "./tests" license_file_path: required: false default: "${{ github.workspace }}/tests/licenses/license.dat" @@ -35,7 +35,7 @@ runs: workdir: matlab files: | ./docker-bake.hcl - ./release-config/${{ matrix.matlab_release }}.env.hcl + ./release-config/${{ inputs.matlab_release }}.env.hcl targets: ${{ inputs.variant }} set: | *.cache-from=type=local,src=/tmp/.buildx-cache @@ -70,7 +70,7 @@ runs: LICENSE_FILE_PATH: ${{ inputs.license_file_path }} working-directory: ${{ inputs.test_dir }} run: | - python -m unittest "test_${{ inputs.variant }}.py" + python -m unittest "matlab/test_${{ inputs.variant }}.py" - name: Publish images shell: bash diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 05a4e66..1d1432b 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -5,7 +5,7 @@ This repository uses workflows to build the Dockerfiles hosted in this repositor ## Overview There are 2 kinds of YML files used here: -1. `build-and-publish-docker-image.yml`, which specifies a reusable workflow, which MUST be called from a workflow configuration file. +1. `build-test-and-publish-dependencies-image.yml`, which specifies a reusable workflow, which MUST be called from a workflow configuration file. 2. Other YML files in the `.github/workflows` directory call this reusable-workflow. Each of these workflows: @@ -120,5 +120,5 @@ Each `reusable-workflow` job consists of the following steps: 1. If the variable "should_add_latest_tag" is present that an additional "latest" tag is added to the image. ---- -Copyright 2023 The MathWorks, Inc. +Copyright 2023-2024 The MathWorks, Inc. ---- diff --git a/.github/workflows/build-and-publish-docker-image.yml b/.github/workflows/build-test-and-publish-dependencies-image.yml similarity index 68% rename from .github/workflows/build-and-publish-docker-image.yml rename to .github/workflows/build-test-and-publish-dependencies-image.yml index 5ef176a..1e8fe50 100644 --- a/.github/workflows/build-and-publish-docker-image.yml +++ b/.github/workflows/build-test-and-publish-dependencies-image.yml @@ -12,7 +12,7 @@ on: workflow_call: inputs: docker_build_context: - description: "Relative path to folder with Dockerfile. Ex: ./matlab-deps/r2023a/ubuntu20.04 " + description: "Relative path to folder with Dockerfile. Ex: ./matlab-deps/r2023a/ubuntu20.04" required: true type: string base_image_name: @@ -35,13 +35,24 @@ on: description: "Specify if this image should also be tagged as latest" required: true type: boolean + test_file_path: + description: "Relative path to the root directory. Ex: ./tests/matlab-deps/test_ubuntu2204.py" + required: false + type: string jobs: build-push-image: runs-on: ubuntu-latest steps: + # Invalid combination would error out. + - name: Invalid combination of should_add_latest_tag set to true and is_default_os set to false + if: ${{ inputs.should_add_latest_tag == true && inputs.is_default_os == false }} + run: | + echo "Invalid situation detected. A workflow marked as latest must also set the default os to be true. " + exit 1 + - name: Checkout repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Image Tags id: setup_image_tags @@ -55,41 +66,34 @@ jobs: # See here for example: https://docs.docker.com/build/ci/github-actions/push-multi-registries/ - name: Login to Docker Hub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v2 - # with: - # registry: ghcr.io - # username: ${{ github.repository_owner }} - # password: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 # Example tags: r2023a-ubuntu20.04, R2023a-ubuntu20.04 - - name: Build & Push Image + - name: Build Image if: ${{ inputs.should_add_latest_tag == false && inputs.is_default_os == false }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ inputs.docker_build_context }} platforms: linux/amd64 - push: true + load: true tags: | ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_AND_OS_CAMEL_CASE }} ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_AND_OS_PASCAL_CASE }} # Example tags: r2023a-ubuntu20.04, R2023a-ubuntu20.04, r2023a, R2023a - - name: Build & Push Image for latest OS + - name: Build Image for latest OS if: ${{ inputs.should_add_latest_tag == false && inputs.is_default_os == true }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ inputs.docker_build_context }} platforms: linux/amd64 - push: true + load: true tags: | ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_ONLY_CAMEL_CASE }} ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_ONLY_PASCAL_CASE }} @@ -97,13 +101,13 @@ jobs: ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_AND_OS_PASCAL_CASE }} # Example tags: r2023a-ubuntu20.04, R2023a-ubuntu20.04, r2023a, R2023a, latest - - name: Build & Push Image with latest Tag for latest OS + - name: Build Image with latest Tag for latest OS if: ${{ inputs.should_add_latest_tag == true && inputs.is_default_os == true }} - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: context: ${{ inputs.docker_build_context }} platforms: linux/amd64 - push: true + load: true tags: | ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_ONLY_CAMEL_CASE }} ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_ONLY_PASCAL_CASE }} @@ -111,9 +115,45 @@ jobs: ${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_AND_OS_PASCAL_CASE }} ${{ inputs.base_image_name }}:latest - # Invalid combination would error out. - - name: Invalid combination of should_add_latest_tag set to true and is_default_os set to false - if: ${{ inputs.should_add_latest_tag == true && inputs.is_default_os == false }} + - name: Should Run Tests + id: run_tests run: | - echo "Invalid situation detected. A workflow marked as latest must also set the default os to be true. " - exit 1 + if [ -n "${{ inputs.test_file_path }}" ]; then + echo "should_run=true" >> $GITHUB_OUTPUT + else + echo "should_run=false" >> $GITHUB_OUTPUT + fi + + - name: Set up Python 3 + if: ${{ steps.run_tests.outputs.should_run == 'true' }} + uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install test dependencies + if: ${{ steps.run_tests.outputs.should_run == 'true' }} + shell: bash + working-directory: tests + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Get test relative path + id: get_test_path + if: ${{ steps.run_tests.outputs.should_run == 'true' }} + run: | + TESTDIR=tests + echo "testdir=${TESTDIR}" >> $GITHUB_OUTPUT + echo "relpath=$(realpath --relative-to=${TESTDIR} ${{ inputs.test_file_path }})" >> $GITHUB_OUTPUT + + - name: Test container + if: ${{ steps.run_tests.outputs.should_run == 'true' }} + shell: bash + env: + IMAGE_NAME: "${{ inputs.base_image_name }}:${{ steps.setup_image_tags.outputs.TAG_RELEASE_AND_OS_CAMEL_CASE }}" + working-directory: ${{ steps.get_test_path.outputs.testdir }} + run: python -m unittest -v ${{ steps.get_test_path.outputs.relpath }} + + - name: Push Image + shell: bash + run: docker push --all-tags ${{ inputs.base_image_name }} diff --git a/.github/workflows/matlab-deps-r2019b-aws-batch.yml b/.github/workflows/matlab-deps-r2019b-aws-batch.yml index 9bab164..e84fb4e 100644 --- a/.github/workflows/matlab-deps-r2019b-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2019b-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2019b/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2019b/aws-batch name: matlab-deps-r2019b-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2019b/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2019b/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2019b' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' diff --git a/.github/workflows/matlab-deps-r2019b-ubuntu18.04.yml b/.github/workflows/matlab-deps-r2019b-ubuntu18.04.yml index 7659366..7a8a334 100644 --- a/.github/workflows/matlab-deps-r2019b-ubuntu18.04.yml +++ b/.github/workflows/matlab-deps-r2019b-ubuntu18.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2019b/ubuntu18.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2019b/ubuntu18.04 name: matlab-deps-r2019b-ubuntu18.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2019b/ubuntu18.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2019b/ubuntu18.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2019b' os_info_tag: 'ubuntu18.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu1804.py' diff --git a/.github/workflows/matlab-deps-r2020a-aws-batch.yml b/.github/workflows/matlab-deps-r2020a-aws-batch.yml index de95e1d..fb85ed6 100644 --- a/.github/workflows/matlab-deps-r2020a-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2020a-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2020a/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2020a/aws-batch name: matlab-deps-r2020a-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2020a/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2020a/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2020a' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' diff --git a/.github/workflows/matlab-deps-r2020a-ubuntu18.04.yml b/.github/workflows/matlab-deps-r2020a-ubuntu18.04.yml index 8be6909..af7b903 100644 --- a/.github/workflows/matlab-deps-r2020a-ubuntu18.04.yml +++ b/.github/workflows/matlab-deps-r2020a-ubuntu18.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2020a/ubuntu18.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2020a/ubuntu18.04 name: matlab-deps-r2020a-ubuntu18.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2020a/ubuntu18.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2020a/ubuntu18.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2020a' os_info_tag: 'ubuntu18.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu1804.py' diff --git a/.github/workflows/matlab-deps-r2020b-aws-batch.yml b/.github/workflows/matlab-deps-r2020b-aws-batch.yml index b0219aa..eea1236 100644 --- a/.github/workflows/matlab-deps-r2020b-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2020b-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2020b/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2020b/aws-batch name: matlab-deps-r2020b-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2020b/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2020b/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2020b' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' diff --git a/.github/workflows/matlab-deps-r2020b-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2020b-ubuntu20.04.yml index 9f17272..a555588 100644 --- a/.github/workflows/matlab-deps-r2020b-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2020b-ubuntu20.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2020b/ubuntu20.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2020b/ubuntu20.04 name: matlab-deps-r2020b-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2020b/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2020b/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2020b' os_info_tag: 'ubuntu20.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2021a-aws-batch.yml b/.github/workflows/matlab-deps-r2021a-aws-batch.yml index 53ce03a..54ba85f 100644 --- a/.github/workflows/matlab-deps-r2021a-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2021a-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2021a/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2021a/aws-batch name: matlab-deps-r2021a-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2021a/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2021a/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2021a' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' diff --git a/.github/workflows/matlab-deps-r2021a-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2021a-ubuntu20.04.yml index 504899b..7340368 100644 --- a/.github/workflows/matlab-deps-r2021a-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2021a-ubuntu20.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2021a/ubuntu20.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2021a/ubuntu20.04 name: matlab-deps-r2021a-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2021a/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2021a/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2021a' os_info_tag: 'ubuntu20.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2021b-aws-batch.yml b/.github/workflows/matlab-deps-r2021b-aws-batch.yml index 2eb14e1..4c34c28 100644 --- a/.github/workflows/matlab-deps-r2021b-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2021b-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2021b/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2021b/aws-batch name: matlab-deps-r2021b-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2021b/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2021b/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2021b' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' diff --git a/.github/workflows/matlab-deps-r2021b-ubi8.yml b/.github/workflows/matlab-deps-r2021b-ubi8.yml index aa49bf5..434a094 100644 --- a/.github/workflows/matlab-deps-r2021b-ubi8.yml +++ b/.github/workflows/matlab-deps-r2021b-ubi8.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2021b/ubi8 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2021b/ubi8 name: matlab-deps-r2021b-ubi8 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2021b/ubi8/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2021b/ubi8' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2021b' os_info_tag: 'ubi8' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi8.py' diff --git a/.github/workflows/matlab-deps-r2021b-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2021b-ubuntu20.04.yml index ec6dd16..5275e5b 100644 --- a/.github/workflows/matlab-deps-r2021b-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2021b-ubuntu20.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2021b/ubuntu20.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2021b/ubuntu20.04 name: matlab-deps-r2021b-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2021b/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2021b/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2021b' os_info_tag: 'ubuntu20.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2022a-aws-batch.yml b/.github/workflows/matlab-deps-r2022a-aws-batch.yml index 9d9c537..51d4795 100644 --- a/.github/workflows/matlab-deps-r2022a-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2022a-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022a/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022a/aws-batch name: matlab-deps-r2022a-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022a/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022a/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022a' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' diff --git a/.github/workflows/matlab-deps-r2022a-ubi8.yml b/.github/workflows/matlab-deps-r2022a-ubi8.yml index d5db4ce..2392206 100644 --- a/.github/workflows/matlab-deps-r2022a-ubi8.yml +++ b/.github/workflows/matlab-deps-r2022a-ubi8.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022a/ubi8 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022a/ubi8 name: matlab-deps-r2022a-ubi8 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022a/ubi8/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022a/ubi8' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022a' os_info_tag: 'ubi8' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi8.py' diff --git a/.github/workflows/matlab-deps-r2022a-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2022a-ubuntu20.04.yml index 8253b21..ac27993 100644 --- a/.github/workflows/matlab-deps-r2022a-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2022a-ubuntu20.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022a/ubuntu20.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022a/ubuntu20.04 name: matlab-deps-r2022a-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022a/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022a/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022a' os_info_tag: 'ubuntu20.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2022b-aws-batch.yml b/.github/workflows/matlab-deps-r2022b-aws-batch.yml index 0416eec..51f0959 100644 --- a/.github/workflows/matlab-deps-r2022b-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2022b-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022b/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022b/aws-batch name: matlab-deps-r2022b-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022b/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022b/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022b' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' diff --git a/.github/workflows/matlab-deps-r2022b-ubi8.yml b/.github/workflows/matlab-deps-r2022b-ubi8.yml index 0e2a383..4d37ecb 100644 --- a/.github/workflows/matlab-deps-r2022b-ubi8.yml +++ b/.github/workflows/matlab-deps-r2022b-ubi8.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022b/ubi8 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022b/ubi8 name: matlab-deps-r2022b-ubi8 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022b/ubi8/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022b/ubi8' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022b' os_info_tag: 'ubi8' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi8.py' diff --git a/.github/workflows/matlab-deps-r2022b-ubi9.yml b/.github/workflows/matlab-deps-r2022b-ubi9.yml index 542cc20..f601144 100644 --- a/.github/workflows/matlab-deps-r2022b-ubi9.yml +++ b/.github/workflows/matlab-deps-r2022b-ubi9.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022b/ubi9 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022b/ubi9 name: matlab-deps-r2022b-ubi9 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022b/ubi9/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022b/ubi9' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022b' os_info_tag: 'ubi9' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi9.py' diff --git a/.github/workflows/matlab-deps-r2022b-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2022b-ubuntu20.04.yml index b15fccf..3c01672 100644 --- a/.github/workflows/matlab-deps-r2022b-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2022b-ubuntu20.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022b/ubuntu20.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022b/ubuntu20.04 name: matlab-deps-r2022b-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022b/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022b/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022b' os_info_tag: 'ubuntu20.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2022b-ubuntu22.04.yml b/.github/workflows/matlab-deps-r2022b-ubuntu22.04.yml index e9e9878..486ccec 100644 --- a/.github/workflows/matlab-deps-r2022b-ubuntu22.04.yml +++ b/.github/workflows/matlab-deps-r2022b-ubuntu22.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2022b/ubuntu22.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2022b/ubuntu22.04 name: matlab-deps-r2022b-ubuntu22.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2022b/ubuntu22.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2022b/ubuntu22.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2022b' os_info_tag: 'ubuntu22.04' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2204.py' diff --git a/.github/workflows/matlab-deps-r2023a-aws-batch.yml b/.github/workflows/matlab-deps-r2023a-aws-batch.yml index 2d158c3..a921206 100644 --- a/.github/workflows/matlab-deps-r2023a-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2023a-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023a/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023a/aws-batch name: matlab-deps-r2023a-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023a/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023a/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023a' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' \ No newline at end of file diff --git a/.github/workflows/matlab-deps-r2023a-ubi8.yml b/.github/workflows/matlab-deps-r2023a-ubi8.yml index da310eb..e3787d1 100644 --- a/.github/workflows/matlab-deps-r2023a-ubi8.yml +++ b/.github/workflows/matlab-deps-r2023a-ubi8.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023a/ubi8 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023a/ubi8 name: matlab-deps-r2023a-ubi8 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023a/ubi8/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023a/ubi8' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023a' os_info_tag: 'ubi8' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi8.py' diff --git a/.github/workflows/matlab-deps-r2023a-ubi9.yml b/.github/workflows/matlab-deps-r2023a-ubi9.yml index 61851d2..bde5ef5 100644 --- a/.github/workflows/matlab-deps-r2023a-ubi9.yml +++ b/.github/workflows/matlab-deps-r2023a-ubi9.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023a/ubi9 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023a/ubi9 name: matlab-deps-r2023a-ubi9 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023a/ubi9/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023a/ubi9' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023a' os_info_tag: 'ubi9' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi9.py' diff --git a/.github/workflows/matlab-deps-r2023a-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2023a-ubuntu20.04.yml index 81c0bd4..8402adf 100644 --- a/.github/workflows/matlab-deps-r2023a-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2023a-ubuntu20.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023a/ubuntu20.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023a/ubuntu20.04 name: matlab-deps-r2023a-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023a/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023a/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023a' os_info_tag: 'ubuntu20.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2023a-ubuntu22.04.yml b/.github/workflows/matlab-deps-r2023a-ubuntu22.04.yml index ba79b1a..fdc7b57 100644 --- a/.github/workflows/matlab-deps-r2023a-ubuntu22.04.yml +++ b/.github/workflows/matlab-deps-r2023a-ubuntu22.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023a/ubuntu22.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023a/ubuntu22.04 name: matlab-deps-r2023a-ubuntu22.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023a/ubuntu22.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023a/ubuntu22.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023a' os_info_tag: 'ubuntu22.04' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2204.py' diff --git a/.github/workflows/matlab-deps-r2023b-aws-batch.yml b/.github/workflows/matlab-deps-r2023b-aws-batch.yml index 4e47f43..72df8a7 100644 --- a/.github/workflows/matlab-deps-r2023b-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2023b-aws-batch.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023b/aws-batch +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023b/aws-batch name: matlab-deps-r2023b-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023b/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023b/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023b' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' \ No newline at end of file diff --git a/.github/workflows/matlab-deps-r2023b-ubi8.yml b/.github/workflows/matlab-deps-r2023b-ubi8.yml index 07f684d..216eee3 100644 --- a/.github/workflows/matlab-deps-r2023b-ubi8.yml +++ b/.github/workflows/matlab-deps-r2023b-ubi8.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023b/ubi8 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023b/ubi8 name: matlab-deps-r2023b-ubi8 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023b/ubi8/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023b/ubi8' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023b' os_info_tag: 'ubi8' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi8.py' diff --git a/.github/workflows/matlab-deps-r2023b-ubi9.yml b/.github/workflows/matlab-deps-r2023b-ubi9.yml index 639efde..7eae8a8 100644 --- a/.github/workflows/matlab-deps-r2023b-ubi9.yml +++ b/.github/workflows/matlab-deps-r2023b-ubi9.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023b/ubi9 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023b/ubi9 name: matlab-deps-r2023b-ubi9 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023b/ubi9/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023b/ubi9' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023b' os_info_tag: 'ubi9' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi9.py' diff --git a/.github/workflows/matlab-deps-r2023b-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2023b-ubuntu20.04.yml index 1ea3ad8..9fc58ee 100644 --- a/.github/workflows/matlab-deps-r2023b-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2023b-ubuntu20.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023b/ubuntu20.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023b/ubuntu20.04 name: matlab-deps-r2023b-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023b/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023b/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023b' os_info_tag: 'ubuntu20.04' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2023b-ubuntu22.04.yml b/.github/workflows/matlab-deps-r2023b-ubuntu22.04.yml index f0ed681..6ee8c9b 100644 --- a/.github/workflows/matlab-deps-r2023b-ubuntu22.04.yml +++ b/.github/workflows/matlab-deps-r2023b-ubuntu22.04.yml @@ -1,5 +1,5 @@ -# Copyright 2023 The MathWorks, Inc. -# Build & Publish matlab-deps/r2023b/ubuntu22.04 +# Copyright 2023-2024 The MathWorks, Inc. +# Build, Test & Publish matlab-deps/r2023b/ubuntu22.04 name: matlab-deps-r2023b-ubuntu22.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2023b/ubuntu22.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2023b/ubuntu22.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2023b' os_info_tag: 'ubuntu22.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2204.py' diff --git a/.github/workflows/matlab-deps-r2024a-aws-batch.yml b/.github/workflows/matlab-deps-r2024a-aws-batch.yml index f6722c1..854af7c 100644 --- a/.github/workflows/matlab-deps-r2024a-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2024a-aws-batch.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024a/aws-batch +# Build, Test & Publish matlab-deps/r2024a/aws-batch name: matlab-deps-r2024a-aws-batch # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2024a/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024a/aws-batch' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2024a' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' \ No newline at end of file diff --git a/.github/workflows/matlab-deps-r2024a-ubi8.yml b/.github/workflows/matlab-deps-r2024a-ubi8.yml index 3031939..9ee16ba 100644 --- a/.github/workflows/matlab-deps-r2024a-ubi8.yml +++ b/.github/workflows/matlab-deps-r2024a-ubi8.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024a/ubi8 +# Build, Test & Publish matlab-deps/r2024a/ubi8 name: matlab-deps-r2024a-ubi8 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2024a/ubi8/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024a/ubi8' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2024a' os_info_tag: 'ubi8' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi8.py' diff --git a/.github/workflows/matlab-deps-r2024a-ubi9.yml b/.github/workflows/matlab-deps-r2024a-ubi9.yml index e2c4504..47e422a 100644 --- a/.github/workflows/matlab-deps-r2024a-ubi9.yml +++ b/.github/workflows/matlab-deps-r2024a-ubi9.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024a/ubi9 +# Build, Test & Publish matlab-deps/r2024a/ubi9 name: matlab-deps-r2024a-ubi9 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2024a/ubi9/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024a/ubi9' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2024a' os_info_tag: 'ubi9' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi9.py' diff --git a/.github/workflows/matlab-deps-r2024a-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2024a-ubuntu20.04.yml index ab5879a..28fbb03 100644 --- a/.github/workflows/matlab-deps-r2024a-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2024a-ubuntu20.04.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024a/ubuntu20.04 +# Build, Test & Publish matlab-deps/r2024a/ubuntu20.04 name: matlab-deps-r2024a-ubuntu20.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2024a/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024a/ubuntu20.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2024a' os_info_tag: 'ubuntu20.04' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2024a-ubuntu22.04.yml b/.github/workflows/matlab-deps-r2024a-ubuntu22.04.yml index e189b9d..6d39911 100644 --- a/.github/workflows/matlab-deps-r2024a-ubuntu22.04.yml +++ b/.github/workflows/matlab-deps-r2024a-ubuntu22.04.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024a/ubuntu22.04 +# Build, Test & Publish matlab-deps/r2024a/ubuntu22.04 name: matlab-deps-r2024a-ubuntu22.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2024a/ubuntu22.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +20,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024a/ubuntu22.04' @@ -27,4 +29,5 @@ jobs: matlab_release_tag: 'r2024a' os_info_tag: 'ubuntu22.04' is_default_os: true - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2204.py' diff --git a/.github/workflows/matlab-deps-r2024b-aws-batch.yml b/.github/workflows/matlab-deps-r2024b-aws-batch.yml index 8912f6d..f763fbf 100644 --- a/.github/workflows/matlab-deps-r2024b-aws-batch.yml +++ b/.github/workflows/matlab-deps-r2024b-aws-batch.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024b/aws-batch +# Build, Test & Publish matlab-deps/r2024b/aws-batch name: matlab-deps-r2024b-aws-batch # Define when builds will occur: @@ -9,8 +9,10 @@ on: branches: - 'main' paths: - - 'matlab-deps/r2024b/aws-batch/**' - '.github/workflows/matlab-deps-r2024b-aws-batch.yml' + - 'matlab-deps/r2024b/aws-batch/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -19,8 +21,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024b/aws-batch' @@ -28,4 +30,5 @@ jobs: matlab_release_tag: 'r2024b' os_info_tag: 'aws-batch' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_awsbatch.py' \ No newline at end of file diff --git a/.github/workflows/matlab-deps-r2024b-ubi8.yml b/.github/workflows/matlab-deps-r2024b-ubi8.yml index b69d498..1de1563 100644 --- a/.github/workflows/matlab-deps-r2024b-ubi8.yml +++ b/.github/workflows/matlab-deps-r2024b-ubi8.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024b/ubi8 +# Build, Test & Publish matlab-deps/r2024b/ubi8 name: matlab-deps-r2024b-ubi8 # Define when builds will occur: @@ -9,7 +9,10 @@ on: branches: - 'main' paths: + - '.github/workflows/matlab-deps-r2024b-ubi8.yml' - 'matlab-deps/r2024b/ubi8/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +21,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024b/ubi8' @@ -27,4 +30,5 @@ jobs: matlab_release_tag: 'r2024b' os_info_tag: 'ubi8' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi8.py' diff --git a/.github/workflows/matlab-deps-r2024b-ubi9.yml b/.github/workflows/matlab-deps-r2024b-ubi9.yml index c7e41c1..e59023c 100644 --- a/.github/workflows/matlab-deps-r2024b-ubi9.yml +++ b/.github/workflows/matlab-deps-r2024b-ubi9.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024b/ubi9 +# Build, Test & Publish matlab-deps/r2024b/ubi9 name: matlab-deps-r2024b-ubi9 # Define when builds will occur: @@ -9,7 +9,10 @@ on: branches: - 'main' paths: + - '.github/workflows/matlab-deps-r2024b-ubi9.yml' - 'matlab-deps/r2024b/ubi9/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +21,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024b/ubi9' @@ -27,4 +30,5 @@ jobs: matlab_release_tag: 'r2024b' os_info_tag: 'ubi9' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubi9.py' diff --git a/.github/workflows/matlab-deps-r2024b-ubuntu20.04.yml b/.github/workflows/matlab-deps-r2024b-ubuntu20.04.yml index 3c36417..93ebfee 100644 --- a/.github/workflows/matlab-deps-r2024b-ubuntu20.04.yml +++ b/.github/workflows/matlab-deps-r2024b-ubuntu20.04.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024b/ubuntu20.04 +# Build, Test & Publish matlab-deps/r2024b/ubuntu20.04 name: matlab-deps-r2024b-ubuntu20.04 # Define when builds will occur: @@ -9,7 +9,10 @@ on: branches: - 'main' paths: + - '.github/workflows/matlab-deps-r2024b-ubuntu20.04.yml' - 'matlab-deps/r2024b/ubuntu20.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +21,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024b/ubuntu20.04' @@ -27,4 +30,5 @@ jobs: matlab_release_tag: 'r2024b' os_info_tag: 'ubuntu20.04' is_default_os: false - should_add_latest_tag: false \ No newline at end of file + should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2004.py' diff --git a/.github/workflows/matlab-deps-r2024b-ubuntu22.04.yml b/.github/workflows/matlab-deps-r2024b-ubuntu22.04.yml index 97cbb20..6116ce1 100644 --- a/.github/workflows/matlab-deps-r2024b-ubuntu22.04.yml +++ b/.github/workflows/matlab-deps-r2024b-ubuntu22.04.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024b/ubuntu22.04 +# Build, Test & Publish matlab-deps/r2024b/ubuntu22.04 name: matlab-deps-r2024b-ubuntu22.04 # Define when builds will occur: @@ -9,7 +9,10 @@ on: branches: - 'main' paths: + - '.github/workflows/matlab-deps-r2024b-ubuntu22.04.yml' - 'matlab-deps/r2024b/ubuntu22.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -18,8 +21,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-test-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024b/ubuntu22.04' @@ -27,4 +30,5 @@ jobs: matlab_release_tag: 'r2024b' os_info_tag: 'ubuntu22.04' is_default_os: true - should_add_latest_tag: true \ No newline at end of file + should_add_latest_tag: true + test_file_path: 'tests/matlab-deps/test_ubuntu2204.py' diff --git a/.github/workflows/matlab-deps-r2024b-ubuntu24.04.yml b/.github/workflows/matlab-deps-r2024b-ubuntu24.04.yml index b983577..0065faa 100644 --- a/.github/workflows/matlab-deps-r2024b-ubuntu24.04.yml +++ b/.github/workflows/matlab-deps-r2024b-ubuntu24.04.yml @@ -1,5 +1,5 @@ # Copyright 2024 The MathWorks, Inc. -# Build & Publish matlab-deps/r2024b/ubuntu24.04 +# Build, Test & Publish matlab-deps/r2024b/ubuntu24.04 name: matlab-deps-r2024b-ubuntu24.04 # Define when builds will occur: @@ -10,6 +10,8 @@ on: - 'main' paths: - 'matlab-deps/r2024b/ubuntu24.04/**' + - '/tests/matlab-deps/**' + - 'tests/pytools/**' # Run at 00:00 on every Monday (1st Day of the Week) (See: crontab.guru) schedule: @@ -19,7 +21,7 @@ on: jobs: build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-deps/r2024b/ubuntu24.04' @@ -28,3 +30,4 @@ jobs: os_info_tag: 'ubuntu24.04' is_default_os: false should_add_latest_tag: false + test_file_path: 'tests/matlab-deps/test_ubuntu2404.py' diff --git a/.github/workflows/matlab-runtime-deps-r2023b-ubuntu22.04.yml b/.github/workflows/matlab-runtime-deps-r2023b-ubuntu22.04.yml index 57b3009..9da0af4 100644 --- a/.github/workflows/matlab-runtime-deps-r2023b-ubuntu22.04.yml +++ b/.github/workflows/matlab-runtime-deps-r2023b-ubuntu22.04.yml @@ -1,4 +1,4 @@ -# Copyright 2023 The MathWorks, Inc. +# Copyright 2023-2024 The MathWorks, Inc. # Build & Publish matlab-runtime-deps/r2023b/ubuntu22.04 name: matlab-runtime-deps-r2023b-ubuntu22.04 @@ -18,8 +18,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-runtime-deps/r2023b/ubuntu22.04' diff --git a/.github/workflows/matlab-runtime-deps-r2024a-ubuntu22.04.yml b/.github/workflows/matlab-runtime-deps-r2024a-ubuntu22.04.yml index d3f2124..949016d 100644 --- a/.github/workflows/matlab-runtime-deps-r2024a-ubuntu22.04.yml +++ b/.github/workflows/matlab-runtime-deps-r2024a-ubuntu22.04.yml @@ -18,8 +18,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './matlab-runtime-deps/r2024a/ubuntu22.04' diff --git a/.github/workflows/polyspace-deps-r2022b-ubuntu20.04.yml b/.github/workflows/polyspace-deps-r2022b-ubuntu20.04.yml index 5644fa3..c18a999 100644 --- a/.github/workflows/polyspace-deps-r2022b-ubuntu20.04.yml +++ b/.github/workflows/polyspace-deps-r2022b-ubuntu20.04.yml @@ -1,4 +1,4 @@ -# Copyright 2023 The MathWorks, Inc. +# Copyright 2023-2024 The MathWorks, Inc. # Build & Publish polyspace-deps/r2022b/ubuntu20.04 name: polyspace-deps-r2022b-ubuntu20.04 @@ -18,8 +18,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './polyspace-deps/r2022b/ubuntu20.04' diff --git a/.github/workflows/polyspace-deps-r2023a-ubuntu20.04.yml b/.github/workflows/polyspace-deps-r2023a-ubuntu20.04.yml index 046297b..6a72a7c 100644 --- a/.github/workflows/polyspace-deps-r2023a-ubuntu20.04.yml +++ b/.github/workflows/polyspace-deps-r2023a-ubuntu20.04.yml @@ -1,4 +1,4 @@ -# Copyright 2023 The MathWorks, Inc. +# Copyright 2023-2024 The MathWorks, Inc. # Build & Publish polyspace-deps/r2023a/ubuntu20.04 name: polyspace-deps-r2023a-ubuntu20.04 @@ -18,8 +18,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './polyspace-deps/r2023a/ubuntu20.04' diff --git a/.github/workflows/polyspace-deps-r2023b-ubuntu22.04.yml b/.github/workflows/polyspace-deps-r2023b-ubuntu22.04.yml index 74c7aef..d60193e 100644 --- a/.github/workflows/polyspace-deps-r2023b-ubuntu22.04.yml +++ b/.github/workflows/polyspace-deps-r2023b-ubuntu22.04.yml @@ -1,4 +1,4 @@ -# Copyright 2023 The MathWorks, Inc. +# Copyright 2023-2024 The MathWorks, Inc. # Build & Publish polyspace-deps/r2023b/ubuntu22.04 name: polyspace-deps-r2023b-ubuntu22.04 @@ -18,8 +18,8 @@ on: workflow_dispatch: jobs: - build-and-publish-docker-image: - uses: ./.github/workflows/build-and-publish-docker-image.yml + build-and-publish-image: + uses: ./.github/workflows/build-test-and-publish-dependencies-image.yml secrets: inherit with: docker_build_context: './polyspace-deps/r2023b/ubuntu22.04' diff --git a/matlab-deps/r2020b/aws-batch/base-dependencies.txt b/matlab-deps/r2020b/aws-batch/base-dependencies.txt index 8bfedbc..36d84e0 100644 --- a/matlab-deps/r2020b/aws-batch/base-dependencies.txt +++ b/matlab-deps/r2020b/aws-batch/base-dependencies.txt @@ -1 +1 @@ -ca-certificates csh g++ gcc gfortran libasound2 libatk1.0-0 libc6 libcairo-gobject2 libcairo2 libcrypt1 libcups2 libdbus-1-3 libfontconfig1 libgdk-pixbuf2.0-0 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-0 libnspr4 libnss3 libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpython2.7 libpython3.8 libselinux1 libsm6 libsndfile1 libtcl8.6 libuuid1 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxft2 libxi6 libxinerama1 libxrandr2 libxrender1 libxt6 libxtst6 libxxf86vm1 locales locales-all procps python3 python3-pip sudo wget xkb-data zip zlib1g \ No newline at end of file +ca-certificates csh g++ gcc gfortran libasound2 libatk1.0-0 libc6 libcairo-gobject2 libcairo2 libcrypt1 libcups2 libdbus-1-3 libfontconfig1 libgdk-pixbuf2.0-0 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-0 libnspr4 libnss3 libpam0g libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpython2.7 libpython3.8 libselinux1 libsm6 libsndfile1 libtcl8.6 libuuid1 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxft2 libxi6 libxinerama1 libxrandr2 libxrender1 libxt6 libxtst6 libxxf86vm1 locales locales-all procps python3 python3-pip sudo wget xkb-data zip zlib1g unzip \ No newline at end of file diff --git a/matlab-deps/r2022a/ubi8/Dockerfile b/matlab-deps/r2022a/ubi8/Dockerfile index 3aadf63..0373bb1 100644 --- a/matlab-deps/r2022a/ubi8/Dockerfile +++ b/matlab-deps/r2022a/ubi8/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022 The MathWorks, Inc. +# Copyright 2022-2024 The MathWorks, Inc. FROM registry.access.redhat.com/ubi8/ubi:8.5-226 LABEL maintainer="The MathWorks, Inc." @@ -6,7 +6,8 @@ LABEL maintainer="The MathWorks, Inc." COPY base-dependencies.txt /tmp/base-dependencies.txt RUN yum update --disableplugin=subscription-manager -y \ - && yum install --disableplugin=subscription-manager -y `cat /tmp/base-dependencies.txt` + && yum install --disableplugin=subscription-manager -y `cat /tmp/base-dependencies.txt` \ + && yum --disableplugin=subscription-manager clean all -y ENV LANG C RUN [ -s /etc/machine-id ] || dbus-uuidgen > /etc/machine-id diff --git a/tests/matlab-deps/.gitignore b/tests/matlab-deps/.gitignore new file mode 100644 index 0000000..94d01d6 --- /dev/null +++ b/tests/matlab-deps/.gitignore @@ -0,0 +1,2 @@ +__pycache__ +.vscode/ \ No newline at end of file diff --git a/tests/matlab/pytools/__init__.py b/tests/matlab-deps/__init__.py similarity index 100% rename from tests/matlab/pytools/__init__.py rename to tests/matlab-deps/__init__.py diff --git a/tests/matlab-deps/test_awsbatch.py b/tests/matlab-deps/test_awsbatch.py new file mode 100644 index 0000000..b5710b2 --- /dev/null +++ b/tests/matlab-deps/test_awsbatch.py @@ -0,0 +1,88 @@ +"""Test class for matlab-deps:aws-batch Docker images.""" + +# Copyright 2024 The MathWorks, Inc. + +from pytools import helper +import unittest +import importlib + +release_platform = importlib.import_module("matlab-deps.utils.release_platform") +test_ubuntu = importlib.import_module("matlab-deps.utils.test_ubuntu") + +PLATFORM = "aws-batch" + +BASE_PLATFORM_DICT = { + "r2019b": "ubuntu18.04", + "r2020a": "ubuntu18.04", + "r2020b": "ubuntu20.04", + "r2021a": "ubuntu20.04", + "r2021b": "ubuntu20.04", + "r2022a": "ubuntu20.04", + "r2022b": "ubuntu20.04", + "r2023a": "ubuntu20.04", + "r2023b": "ubuntu22.04", + "r2024a": "ubuntu22.04", + "r2024b": "ubuntu22.04", +} + + +class TestAWSBatch(test_ubuntu.TestUbuntu): + + def setUp(self): + """Skip this test class unless the platform contains 'aws-batch'""" + if not PLATFORM in self.platform: + self.skipTest( + f"skipping matlab-deps:{PLATFORM} test suite for {self.container.image.tags}" + ) + + def test_additional_packages_installed(self): + """Test that the software packages listed below are installed in the container""" + extra_pkgs = [ + "csh", + "g++", + "gcc", + "gfortran", + "python3", + "python3-pip", + "sudo", + "unzip", + "zip", + ] + for name in extra_pkgs: + with self.subTest(package_name=name): + self.assertTrue(self.host.package(name).is_installed) + + def test_packages_are_upgraded(self): + """Skip parent's method for some releases.""" + releases_to_skip = ["r2022b", "r2023a"] + if self.release.lower() in releases_to_skip: + self.skipTest("Some packages are allowed to install downgraded versions") + + super().test_packages_are_upgraded() + + def test_awscli_is_installed(self): + """Test that the AWS CLI tool is installed""" + cmd = self.host.run("aws --version") + self.assertEqual(cmd.rc, 0) + + def test_same_packages_as_base_image(self): + """Test that each package installed in matlab-deps is also present in aws-batch""" + base_platform_deps_list = helper.parse_file_to_list( + release_platform.get_deps_list_filepath( + self.release, BASE_PLATFORM_DICT[self.release] + ) + ) + for name in base_platform_deps_list: + with self.subTest(package_name=name): + self.assertTrue(self.host.package(name).is_installed) + + def test_entrypoint_script_present(self): + entry_script_path = "/usr/local/stageDataAndRunJob.sh" + self.assertTrue(self.host.file(entry_script_path).exists) + self.assertTrue(self.host.file(entry_script_path).is_executable) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/test_ubi8.py b/tests/matlab-deps/test_ubi8.py new file mode 100644 index 0000000..d51a920 --- /dev/null +++ b/tests/matlab-deps/test_ubi8.py @@ -0,0 +1,24 @@ +"""Test class for matlab-deps:ubi8 Docker images.""" + +# Copyright 2024 The MathWorks, Inc. + +import unittest +import importlib + +test_ubi = importlib.import_module("matlab-deps.utils.test_ubi") +PLATFORM = "ubi8" + + +class TestUbi8(test_ubi.TestUbi): + def setUp(self): + """Skip this test class unless the platform is 'ubi8'""" + if not PLATFORM in self.platform: + self.skipTest( + f"skipping matlab-deps:{PLATFORM} test suite for {self.container.image.tags}" + ) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/test_ubi9.py b/tests/matlab-deps/test_ubi9.py new file mode 100644 index 0000000..7a035d8 --- /dev/null +++ b/tests/matlab-deps/test_ubi9.py @@ -0,0 +1,24 @@ +"""Test class for matlab-deps:ubi9 Docker images.""" + +# Copyright 2024 The MathWorks, Inc. + +import unittest +import importlib + +test_ubi = importlib.import_module("matlab-deps.utils.test_ubi") +PLATFORM = "ubi9" + + +class TestUbi9(test_ubi.TestUbi): + def setUp(self): + """Skip this test class unless the platform is 'ubi9'""" + if not PLATFORM in self.platform: + self.skipTest( + f"skipping matlab-deps:{PLATFORM} test suite for {self.container.image.tags}" + ) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/test_ubuntu1804.py b/tests/matlab-deps/test_ubuntu1804.py new file mode 100644 index 0000000..190e98d --- /dev/null +++ b/tests/matlab-deps/test_ubuntu1804.py @@ -0,0 +1,24 @@ +"""Test class for matlab-deps:ubuntu18.04 Docker images.""" + +# Copyright 2024 The MathWorks, Inc. + +import unittest +import importlib + +test_ubuntu = importlib.import_module("matlab-deps.utils.test_ubuntu") +PLATFORM = "ubuntu18.04" + + +class TestUbuntu1804(test_ubuntu.TestUbuntu): + def setUp(self): + """Skip this test class unless the platform is 'ubuntu18.04'""" + if not PLATFORM in self.platform: + self.skipTest( + f"skipping matlab-deps:{PLATFORM} test suite for {self.container.image.tags}" + ) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/test_ubuntu2004.py b/tests/matlab-deps/test_ubuntu2004.py new file mode 100644 index 0000000..8bc1b1b --- /dev/null +++ b/tests/matlab-deps/test_ubuntu2004.py @@ -0,0 +1,37 @@ +"""Test class for matlab-deps:ubuntu20.04 Docker images.""" + +# Copyright 2024 The MathWorks, Inc. + +import unittest +import importlib + +test_ubuntu = importlib.import_module("matlab-deps.utils.test_ubuntu") +PLATFORM = "ubuntu20.04" + + +class TestUbuntu2004(test_ubuntu.TestUbuntu): + def setUp(self): + """Skip this test class unless the platform is 'ubuntu20.04'""" + if not PLATFORM in self.platform: + self.skipTest( + f"skipping matlab-deps:{PLATFORM} test suite for {self.container.image.tags}" + ) + + def test_glibc_fix_packages_are_installed(self): + """test that the packages required for the glibc fix are installed""" + releases_to_skip = ["r2020b", "r2021a"] + if self.release.lower() in releases_to_skip: + self.skipTest( + f"The glibc fix is not required for these MATLAB releases {self.release}" + ) + + packages = ["libcrypt-dev", "linux-libc-dev"] + for pkg in packages: + with self.subTest(package_name=pkg): + self.assertTrue(self.host.package(pkg).is_installed) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/test_ubuntu2204.py b/tests/matlab-deps/test_ubuntu2204.py new file mode 100644 index 0000000..e9dbb99 --- /dev/null +++ b/tests/matlab-deps/test_ubuntu2204.py @@ -0,0 +1,26 @@ +"""Test class for matlab-deps:ubuntu22.04 Docker images.""" + +# Copyright 2024 The MathWorks, Inc. + +import unittest +import importlib + +test_ubuntu = importlib.import_module("matlab-deps.utils.test_ubuntu") + + +PLATFORM = "ubuntu22.04" + + +class TestUbuntu2204(test_ubuntu.TestUbuntu): + def setUp(self): + """Skip this test class unless the platform is 'ubuntu22.04'""" + if not PLATFORM in self.platform: + self.skipTest( + f"skipping matlab-deps:{PLATFORM} test suite for {self.container.image.tags}" + ) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/test_ubuntu2404.py b/tests/matlab-deps/test_ubuntu2404.py new file mode 100644 index 0000000..ae5b0a8 --- /dev/null +++ b/tests/matlab-deps/test_ubuntu2404.py @@ -0,0 +1,26 @@ +"""Test class for matlab-deps:ubuntu24.04 Docker images.""" + +# Copyright 2024 The MathWorks, Inc. + +import unittest +import importlib + +test_ubuntu = importlib.import_module("matlab-deps.utils.test_ubuntu") + + +PLATFORM = "ubuntu24.04" + + +class TestUbuntu2404(test_ubuntu.TestUbuntu): + def setUp(self): + """Skip this test class unless the platform is 'ubuntu24.04'""" + if not PLATFORM in self.platform: + self.skipTest( + f"skipping matlab-deps:{PLATFORM} test suite for {self.container.image.tags}" + ) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/utils/__init__.py b/tests/matlab-deps/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/matlab-deps/utils/base.py b/tests/matlab-deps/utils/base.py new file mode 100644 index 0000000..b5274bd --- /dev/null +++ b/tests/matlab-deps/utils/base.py @@ -0,0 +1,67 @@ +"""Base test class for matlab-deps Docker images.""" + +# Copyright 2021-2024 The MathWorks, Inc. + +import unittest +import docker +import testinfra +from . import release_platform +from pytools import helper + + +class TestCase(unittest.TestCase): + @classmethod + def setUpClass(cls): + image_name = helper.get_image_name() + getter = release_platform.Getter(image_name) + + cls.dependencies_list = helper.parse_file_to_list(getter.deps_list_filepath) + cls.release = getter.release + cls.platform = getter.platform + cls.client = docker.from_env() + cls.container = cls.client.containers.run( + image=image_name, + detach=True, + stdin_open=True, + entrypoint="/bin/bash", + ) + cls.host = testinfra.get_host("docker://" + cls.container.id) + + @classmethod + def tearDownClass(cls): + cls.container.stop(timeout=0) + cls.container.remove() + cls.client.close() + + ###################################################################### + + def test_packages_present(self): + """Test that the software packages listed below are installed in the container""" + for name in self.dependencies_list: + with self.subTest(package_name=name): + self.assertTrue(self.host.package(name).is_installed) + + def test_absent_matlab_dir(self): + """Test that matlab is not install in container""" + dirlist = ["/usr/local/bin", "/usr/bin", "/opt"] + for dir in dirlist: + with self.subTest(dir=dir): + self.assertNotIn("matlab", self.host.file(dir).listdir()) + + def test_matlab_absent(self): + """Test that the command 'matlab' does not work""" + self.assertNotEqual(self.host.run("matlab").rc, 0) + + def test_unset_envs(self): + """Test that some environment variables are not persisted in the images.""" + envs = ["DEBIAN_FRONTEND", "TZ"] + for env in envs: + with self.subTest(env=env): + val = self.host.environment().get(env) + self.assertIsNone(val, f"{env} was expected to be unset but got {val}") + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/utils/release_platform.py b/tests/matlab-deps/utils/release_platform.py new file mode 100644 index 0000000..5374128 --- /dev/null +++ b/tests/matlab-deps/utils/release_platform.py @@ -0,0 +1,74 @@ +# Copyright 2023-2024 The MathWorks, Inc. + +"""Getter class to get platform and release info from a system-under-test (SUT) name.""" + +from pathlib import Path +import re +import os + +_MATLAB_DEPS_ROOT_ = Path(__file__).parents[3] / "matlab-deps" +DEPENDENCIES_LIST_FILENAME = "base-dependencies.txt" + +ubuntu_re = re.compile("ubuntu[0-9]{2}.[0-9]{2}") +ubi_re = re.compile("ubi[0-9]") +aws_re = re.compile("aws-batch") +platform_re = re.compile(f"({ubuntu_re.pattern})|({ubi_re.pattern})|({aws_re.pattern})") + +release_re = re.compile("R20[0-9]{2}[ab]", re.IGNORECASE) + + +def is_valid_release(str): + match = release_re.fullmatch(str) + if match: + return True + else: + return False + + +def get_deps_list_filepath(release, platform): + return str( + _MATLAB_DEPS_ROOT_ / release.lower() / platform / DEPENDENCIES_LIST_FILENAME + ) + + +class Getter: + def __init__(self, name) -> None: + self.name = name + + @property + def release(self): + """Get the release from the image's name. If not possible, get the release from the source repo""" + match = release_re.search(self.name) + if match: + return match.group(0) + else: # by default, return the latest release available in the container-images repository + release_subdirs = list( + filter( + is_valid_release, + os.listdir(str(_MATLAB_DEPS_ROOT_)), + ) + ) + release_subdirs.sort() + return release_subdirs[-1] + + @property + def platform(self): + """Get the platform from the image's name. If not possible, get the platform from the source repo""" + match = platform_re.search(self.name) + if match: + return match.group(0) + else: # if there is no match, look the ubuntu version for the tested release and return the latest + matlab_deps_root = str(_MATLAB_DEPS_ROOT_) + + ubuntu_platforms = list( + filter( + lambda x: ubuntu_re.fullmatch(x) is not None, + os.listdir(f"{matlab_deps_root}/{self.release.lower()}"), + ) + ) + ubuntu_platforms.sort() + return ubuntu_platforms[-1] + + @property + def deps_list_filepath(self): + return get_deps_list_filepath(self.release, self.platform) diff --git a/tests/matlab-deps/utils/test_ubi.py b/tests/matlab-deps/utils/test_ubi.py new file mode 100644 index 0000000..449369c --- /dev/null +++ b/tests/matlab-deps/utils/test_ubi.py @@ -0,0 +1,47 @@ +"""Test class for matlab-deps:ubi* Docker images.""" + +# Copyright 2023-2024 The MathWorks, Inc. + +import unittest +from . import base + +UBI = "ubi" + + +class TestUbi(base.TestCase): + + def test_packages_are_upgraded(self): + """Test that the packages installed in the container are updated to the latest version""" + cmd = "yum check-update" + cmd_res = self.host.run(cmd) + self.assertNotEqual( + cmd_res.rc, + 100, # YUM/DNF exit code will be 100 when there are updates available + f"The command\n\n{cmd}\n\nshowed that some packages are not up-to-date. The output is:\n\n{cmd_res.stdout}", + ) + + def test_package_manager_cache_is_clean(self): + """Test that the yum/dnf cache got cleaned after installation of the packages.""" + for filename in self.host.file("/var/cache/dnf").listdir(): + fullname = "/var/cache/dnf/" + filename + if self.host.file(fullname).is_file: + # no .solv/.solvx files in /var/cache/dnf + with self.subTest(filename=filename): + self.assertNotRegex(filename, ".solv") + elif self.host.file(fullname).is_directory: + # var/cache/dnf/ubi-8-appstream-..../repodata is empty + # var/cache/dnf/ubi-8-baseos-..../repodata is empty + # var/cache/dnf/ubi-8-codeready-builder-..../repodata is empty + fullname = fullname + "/repodata" + with self.subTest(dirname=fullname): + self.assertEqual( + len(self.host.file(fullname).listdir()), + 0, + f"{fullname} is not empty", + ) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab-deps/utils/test_ubuntu.py b/tests/matlab-deps/utils/test_ubuntu.py new file mode 100644 index 0000000..b93c187 --- /dev/null +++ b/tests/matlab-deps/utils/test_ubuntu.py @@ -0,0 +1,43 @@ +"""Test class for matlab-deps:ubuntu Docker images.""" + +# Copyright 2023-2024 The MathWorks, Inc. + +import re +import unittest +from . import base + +UBUNTU = "ubuntu" + + +class TestUbuntu(base.TestCase): + + def test_packages_are_upgraded(self): + """Test that the packages installed in the container are updated to the latest version""" + # run `apt-get -s upgrade` to check if ANY package needs to be upgraded. + # Alternatives are: + # - `apt-get -s install DEPENDENCIES_LIST`: which will only run on the MATLAB dependencies packages + # - `apt list --upgreadeable` which does not have a stable interface + cmd = "apt-get -s upgrade" + cmd_res = self.host.run(cmd) + self.assertTrue(cmd_res.succeeded, f"command {cmd} failed:\n{cmd_res.stderr}") + + installable_pkg_re = "The following packages will be installed" + upgradeable_pkg_re = "The following packages will be upgraded" + self.assertNotRegex( + cmd_res.stdout, + re.compile(f"({installable_pkg_re})|({upgradeable_pkg_re})"), + f"The command\n\n{cmd}\n\nshowed that some packages are not up-to-date. The output is:\n\n{cmd_res.stdout}", + ) + + def test_package_manager_cache_is_clean(self): + """Test that the apt-get cache got cleaned after installation of the packages.""" + self.assertSetEqual( + set(self.host.file("/var/cache/apt/archives").listdir()), + {"lock", "partial"}, + ) + + +###################################################################### + +if __name__ == "__main__": + unittest.main() diff --git a/tests/matlab/matlab/test_ddux.py b/tests/matlab/matlab/test_ddux.py index bc686af..069cc35 100644 --- a/tests/matlab/matlab/test_ddux.py +++ b/tests/matlab/matlab/test_ddux.py @@ -4,7 +4,7 @@ import unittest -from shared import test_ddux +from ..shared import test_ddux class TestDDUX(test_ddux.TestDDUX): diff --git a/tests/matlab/matlab_deep_learning/test_ddux.py b/tests/matlab/matlab_deep_learning/test_ddux.py index 8d6788f..f0ea8f1 100644 --- a/tests/matlab/matlab_deep_learning/test_ddux.py +++ b/tests/matlab/matlab_deep_learning/test_ddux.py @@ -4,7 +4,7 @@ import unittest -from shared import test_ddux +from ..shared import test_ddux class TestDDUX(test_ddux.TestDDUX): diff --git a/tests/matlab/shared/test_matlab_proxy_integration.py b/tests/matlab/shared/test_matlab_proxy_integration.py index 8b89945..075b359 100644 --- a/tests/matlab/shared/test_matlab_proxy_integration.py +++ b/tests/matlab/shared/test_matlab_proxy_integration.py @@ -123,7 +123,11 @@ def test_pipx_packages(self): def test_matlab_proxy_version(self): """Test that the matlab-proxy module in the container has the latest version""" cmd = self.host.run("pipx upgrade matlab-proxy") - self.assertIn("matlab-proxy is already at latest version", cmd.stdout) + self.assertIn( + "matlab-proxy is already at latest version", + cmd.stdout, + "matlab-proxy is not at the latest version:\n\n\t" + cmd.stdout, + ) def test_matlab_proxy_app_installed(self): """Test that the executable matlab_proxy_app is located on PATH and executable""" diff --git a/tests/matlab/test_matlab-deep-learning.py b/tests/matlab/test_matlab-deep-learning.py index 880908e..e635446 100644 --- a/tests/matlab/test_matlab-deep-learning.py +++ b/tests/matlab/test_matlab-deep-learning.py @@ -2,18 +2,20 @@ """Run the tests for the mathworks/matlab-deep-learning image""" -from matlab_deep_learning.run_DeepLearningAddonsTests import Run_DeepLearningAddonsTests -from matlab_deep_learning.test_ddux import TestDDUX -from shared.run_startup import Run_Startup_Test -from shared.test_matlab_docker_batch import TestBatchMode -from shared.test_matlab_docker_shell import TestBasicFeatures -from shared.test_matlab_docker_vnc import TestVncMode -from shared.test_matlab_proxy_integration import ( +from .matlab_deep_learning.run_DeepLearningAddonsTests import ( + Run_DeepLearningAddonsTests, +) +from .matlab_deep_learning.test_ddux import TestDDUX +from .shared.run_startup import Run_Startup_Test +from .shared.test_matlab_docker_batch import TestBatchMode +from .shared.test_matlab_docker_shell import TestBasicFeatures +from .shared.test_matlab_docker_vnc import TestVncMode +from .shared.test_matlab_proxy_integration import ( TestMatlabProxyInteg, TestMatlabProxyIntegAdvanced, TestMatlabProxyIntegNoLic, ) -from shared.test_msh_integration import TestMSHIntegration +from .shared.test_msh_integration import TestMSHIntegration from pytools.test_suite_launcher import TestSuite ################################################################################ diff --git a/tests/matlab/test_matlab.py b/tests/matlab/test_matlab.py index 55e283b..2b25275 100644 --- a/tests/matlab/test_matlab.py +++ b/tests/matlab/test_matlab.py @@ -2,18 +2,18 @@ """Run the tests for the mathworks/matlab image""" -from matlab.run_AvailableProductsTest import Run_AvailableProductsTest -from matlab.test_ddux import TestDDUX -from shared.run_startup import Run_Startup_Test -from shared.test_matlab_docker_batch import TestBatchMode -from shared.test_matlab_docker_shell import TestBasicFeatures -from shared.test_matlab_docker_vnc import TestVncMode -from shared.test_matlab_proxy_integration import ( +from .matlab.run_AvailableProductsTest import Run_AvailableProductsTest +from .matlab.test_ddux import TestDDUX +from .shared.run_startup import Run_Startup_Test +from .shared.test_matlab_docker_batch import TestBatchMode +from .shared.test_matlab_docker_shell import TestBasicFeatures +from .shared.test_matlab_docker_vnc import TestVncMode +from .shared.test_matlab_proxy_integration import ( TestMatlabProxyInteg, TestMatlabProxyIntegAdvanced, TestMatlabProxyIntegNoLic, ) -from shared.test_msh_integration import TestMSHIntegration +from .shared.test_msh_integration import TestMSHIntegration from pytools.test_suite_launcher import TestSuite ################################################################################ diff --git a/tests/pytools/__init__.py b/tests/pytools/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/matlab/pytools/dockertool.py b/tests/pytools/dockertool.py similarity index 100% rename from tests/matlab/pytools/dockertool.py rename to tests/pytools/dockertool.py diff --git a/tests/matlab/pytools/helper.py b/tests/pytools/helper.py similarity index 93% rename from tests/matlab/pytools/helper.py rename to tests/pytools/helper.py index 47b3c25..6d17240 100644 --- a/tests/matlab/pytools/helper.py +++ b/tests/pytools/helper.py @@ -3,6 +3,7 @@ # Copyright 2021-2024 The MathWorks, Inc. import os +import re import time ######################################################### @@ -15,11 +16,6 @@ def get_image_name(): return _get_env("IMAGE_NAME") -def get_install_dir(): - """Get the MATLAB install path from the environment""" - return _get_env("MW_INSTALL") - - def get_license_filepath(): """Get the path of the license file from the environment""" filepath = _get_env("LICENSE_FILE_PATH") @@ -91,6 +87,25 @@ def get_process_env_variables(host, pid): return envs +def parse_file_to_list(filepath): + list = [] + with open(filepath) as file: + for line in file: + list.extend(line.split()) + return list + + +release_re = re.compile("R20[0-9]{2}[ab]", re.IGNORECASE) + + +def is_valid_release(str): + match = release_re.fullmatch(str) + if match: + return True + else: + return False + + ## Wait functions ## diff --git a/tests/matlab/pytools/test_suite_launcher.py b/tests/pytools/test_suite_launcher.py similarity index 100% rename from tests/matlab/pytools/test_suite_launcher.py rename to tests/pytools/test_suite_launcher.py diff --git a/tests/matlab/requirements.txt b/tests/requirements.txt similarity index 100% rename from tests/matlab/requirements.txt rename to tests/requirements.txt