From 625a1db16c32108a41b4cee3127c4456fce2a73b Mon Sep 17 00:00:00 2001 From: tylertitsworth Date: Thu, 30 May 2024 08:29:33 -0700 Subject: [PATCH 1/2] allow pr from fork --- .github/workflows/chart-ci.yaml | 54 ++++++++++++++ .github/workflows/container-ci.yaml | 17 +++++ .github/workflows/dependency-review.yaml | 10 +-- .github/workflows/dockerhub-description.yml | 24 +++--- .github/workflows/docs.yaml | 30 ++++---- .github/workflows/gitleaks.yaml | 21 +++--- .github/workflows/integration-test.yaml | 81 +++++++++++---------- .github/workflows/lint.yaml | 43 +++++------ .github/workflows/scorecard.yaml | 38 +++++----- .github/workflows/test-runner-ci.yaml | 12 ++- .github/workflows/weekly-test.yaml | 27 +++---- 11 files changed, 222 insertions(+), 135 deletions(-) create mode 100644 .github/workflows/chart-ci.yaml diff --git a/.github/workflows/chart-ci.yaml b/.github/workflows/chart-ci.yaml new file mode 100644 index 000000000..d98a6bc8d --- /dev/null +++ b/.github/workflows/chart-ci.yaml @@ -0,0 +1,54 @@ +# Copyright (c) 2024 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Helm Chart CI +on: + pull_request: null + # pull_request_target: + # types: [opened, edited, reopened, synchronize] + # branches: [main] + merge_group: null +permissions: read-all +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + helm-ci: + runs-on: kubectl + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + # ref: ${{ github.event.pull_request.head.ref || github.ref }} + - uses: azure/setup-kubectl@v4 + - uses: azure/setup-helm@v4.2.0 + - uses: actions/setup-python@v5 + with: + python-version: 3.x + - name: Setup chart-testing + uses: helm/chart-testing-action@v2.6.1 + - name: Get chart diff + id: changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }} --config .github/ct.yaml) + if [[ -n "$changed" ]]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + - name: Helm Lint, Install, and Test + if: steps.changed.outputs.changed == 'true' + run: | + kubectl config use-context kubeflow + ct lint-and-install --target-branch ${{ github.event.repository.default_branch }} --config .github/ct.yaml --debug --namespace helm-ci + env: + KUBECONFIG: ${{ secrets.KUBECONFIG_PATH }} diff --git a/.github/workflows/container-ci.yaml b/.github/workflows/container-ci.yaml index 34c915572..8afc941ce 100644 --- a/.github/workflows/container-ci.yaml +++ b/.github/workflows/container-ci.yaml @@ -35,6 +35,10 @@ on: description: 'Enter Bash Env Variable Overrides in `KEY=VAL KEY2=VAL2` format:' required: false type: string + ref: + description: 'Enter Git Ref:' + required: true + type: string runner_label: description: 'Enter Validation Runner Label:' default: test-runner @@ -66,6 +70,9 @@ on: no_start: required: false type: boolean + ref: + required: true + type: string jobs: #################################################################################################### # Compose Build @@ -76,6 +83,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - name: Set Matrix id: build-matrix run: echo "matrix=$(jq -c . < ${{ inputs.group_dir }}/.actions.json)" >> $GITHUB_OUTPUT @@ -93,6 +102,8 @@ jobs: group: ${{ steps.build-group.outputs.container-group }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} if: ${{ !inputs.no_build }} - uses: docker/login-action@v3 with: @@ -136,6 +147,8 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - uses: docker/login-action@v3 with: registry: ${{ secrets.REGISTRY }} @@ -164,6 +177,8 @@ jobs: matrix: ${{ steps.test-matrix.outputs.matrix }} steps: - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - name: Get Recipes id: test-matrix run: echo "matrix=$(find ${{ inputs.group_dir }} -type f -name 'tests.yaml' -exec dirname {} \; | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT @@ -181,6 +196,8 @@ jobs: with: egress-policy: audit - uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} - uses: docker/login-action@v3 with: registry: ${{ secrets.REGISTRY }} diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index b5c15d4b7..c8db227de 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -25,14 +25,14 @@ on: [pull_request] permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} jobs: dependency-review: runs-on: ubuntu-latest permissions: pull-requests: write steps: - - uses: actions/checkout@v4 - - uses: actions/dependency-review-action@v4 - with: - comment-summary-in-pr: true + - uses: actions/checkout@v4 + - uses: actions/dependency-review-action@v4 + with: + comment-summary-in-pr: true diff --git a/.github/workflows/dockerhub-description.yml b/.github/workflows/dockerhub-description.yml index 10ac0a197..f2849b6bf 100644 --- a/.github/workflows/dockerhub-description.yml +++ b/.github/workflows/dockerhub-description.yml @@ -15,7 +15,7 @@ name: Docker Description Publish on: push: - branches: [ "main" ] + branches: ["main"] permissions: read-all jobs: setup-matrix: @@ -23,10 +23,10 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v4 - - name: Set matrix data - id: set-matrix - run: echo "matrix=$(jq -c . < .github/dockerhub-readmes.json)" >> $GITHUB_OUTPUT + - uses: actions/checkout@v4 + - name: Set matrix data + id: set-matrix + run: echo "matrix=$(jq -c . < .github/dockerhub-readmes.json)" >> $GITHUB_OUTPUT publish-dockerhub-description: runs-on: ubuntu-latest needs: setup-matrix @@ -34,10 +34,10 @@ jobs: matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} fail-fast: false steps: - - uses: actions/checkout@v4 - - uses: peter-evans/dockerhub-description@v4 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - repository: ${{ matrix.readmes.repo-name }} - readme-filepath: ${{ matrix.readmes.fname }} + - uses: actions/checkout@v4 + - uses: peter-evans/dockerhub-description@v4 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + repository: ${{ matrix.readmes.repo-name }} + readme-filepath: ${{ matrix.readmes.fname }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index f1a207e45..e927369d4 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -21,7 +21,7 @@ on: - main permissions: read-all concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: mkdocs: @@ -31,17 +31,17 @@ jobs: id-token: write pages: write steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.8 - cache: pip - - name: Install python requirements - run: python -m pip install -r docs/requirements.txt - - name: Build - run: mkdocs build --clean - - uses: actions/upload-pages-artifact@v3 - with: - path: site - - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) - uses: actions/deploy-pages@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: 3.8 + cache: pip + - name: Install python requirements + run: python -m pip install -r docs/requirements.txt + - name: Build + run: mkdocs build --clean + - uses: actions/upload-pages-artifact@v3 + with: + path: site + - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/gitleaks.yaml b/.github/workflows/gitleaks.yaml index 947408a23..36eb7cc39 100644 --- a/.github/workflows/gitleaks.yaml +++ b/.github/workflows/gitleaks.yaml @@ -16,8 +16,10 @@ name: gitleaks on: push: branches: - - main - pull_request: null + - main + pull_request_target: + types: [opened, edited, reopened, synchronize] + branches: [main] workflow_dispatch: null permissions: read-all jobs: @@ -25,10 +27,11 @@ jobs: name: gitleaks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: gitleaks/gitleaks-action@v2 - env: - GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} - GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref || github.ref }} + - uses: gitleaks/gitleaks-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index 325d70065..9f87ecc11 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -12,14 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. ---- name: Integration Tests on: merge_group: null - pull_request: null + pull_request_target: + types: [opened, edited, reopened, synchronize] + branches: [main] permissions: read-all concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: group-diff: @@ -27,34 +28,35 @@ jobs: outputs: groups: ${{ steps.group-list.outputs.FOLDERS }} steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - name: Output Modified Group Directories - id: group-list - run: | - # Get diff array filtered by specific filetypes - DIFF=$(git diff --diff-filter=d \ - --name-only ${{ github.event.merge_group.base_sha || github.event.pull_request.base.sha }}...${{ github.event.merge_group.head_sha || github.event.pull_request.head.sha }} \ - -- '*/*Dockerfile' '*.py' '*.yaml' '*.yml' '*.sh' '*/*requirements.txt' '*.json' | \ - jq -R '.' | jq -sc '.' \ - ) - # Search for compose files in each file to determine the container groups - DOCKER_COMPOSE_PATHS=() - for path in $(echo $DIFF | jq -r '.[]'); do - while [[ "$path" != "." ]]; do - DIR_PATH=$(dirname "$path") - if [ -n "$(find "$DIR_PATH" -name 'docker-compose.yaml' -print -quit)" ] && [ "$DIR_PATH" != "." ]; then - DOCKER_COMPOSE_PATHS+=("$DIR_PATH") - path="." - else - path="$DIR_PATH" - fi - done + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref || github.ref }} + - name: Output Modified Group Directories + id: group-list + run: | + # Get diff array filtered by specific filetypes + DIFF=$(git diff --diff-filter=d \ + --name-only ${{ github.event.merge_group.base_sha || github.event.pull_request.base.sha }}...${{ github.event.merge_group.head_sha || github.event.pull_request.head.sha }} \ + -- '*/*Dockerfile' '*.py' '*.yaml' '*.yml' '*.sh' '*/*requirements.txt' '*.json' | \ + jq -R '.' | jq -sc '.' \ + ) + # Search for compose files in each file to determine the container groups + DOCKER_COMPOSE_PATHS=() + for path in $(echo $DIFF | jq -r '.[]'); do + while [[ "$path" != "." ]]; do + DIR_PATH=$(dirname "$path") + if [ -n "$(find "$DIR_PATH" -name 'docker-compose.yaml' -print -quit)" ] && [ "$DIR_PATH" != "." ]; then + DOCKER_COMPOSE_PATHS+=("$DIR_PATH") + path="." + else + path="$DIR_PATH" + fi done - # Convert the array to a JSON array - DOCKER_COMPOSE_PATHS_JSON=$(printf '%s\n' "${DOCKER_COMPOSE_PATHS[@]}" | jq -R '.' | jq -sc 'unique_by(.)') - echo "FOLDERS=$DOCKER_COMPOSE_PATHS_JSON" >> $GITHUB_OUTPUT + done + # Convert the array to a JSON array + DOCKER_COMPOSE_PATHS_JSON=$(printf '%s\n' "${DOCKER_COMPOSE_PATHS[@]}" | jq -R '.' | jq -sc 'unique_by(.)') + echo "FOLDERS=$DOCKER_COMPOSE_PATHS_JSON" >> $GITHUB_OUTPUT pipeline-ci: needs: group-diff if: needs.group-diff.outputs.groups != '[""]' @@ -66,17 +68,18 @@ jobs: uses: ./.github/workflows/container-ci.yaml with: group_dir: ${{ matrix.group }} + ref: "refs/pull/${{ github.event.number }}/merge" secrets: inherit status-check: - needs: [ group-diff, pipeline-ci ] + needs: [group-diff, pipeline-ci] runs-on: ubuntu-latest if: always() steps: - - run: exit 1 - if: >- - ${{ - contains(needs.*.result, 'failure') - || contains(needs.*.result, 'cancelled') - || contains(needs.*.result, 'skipped') - && needs.group-diff.outputs.groups != '[""]' - }} + - run: exit 1 + if: >- + ${{ + contains(needs.*.result, 'failure') + || contains(needs.*.result, 'cancelled') + || contains(needs.*.result, 'skipped') + && needs.group-diff.outputs.groups != '[""]' + }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 42765f259..9d23711fd 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -12,37 +12,38 @@ # See the License for the specific language governing permissions and # limitations under the License. ---- name: Lint permissions: read-all on: merge_group: null - pull_request: null + pull_request_target: + types: [opened, edited, reopened, synchronize] + branches: [main] push: branches: - - develop - - main + - main concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: lint: name: Lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: super-linter/super-linter/slim@v6.5.1 - env: - # To report GitHub Actions status checks - GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} - GITHUB_ACTIONS_COMMAND_ARGS: '-ignore SC.*' - VALIDATE_BASH_EXEC: false - VALIDATE_CHECKOV: false - VALIDATE_HTML: false - VALIDATE_KUBERNETES_KUBECONFORM: false - VALIDATE_NATURAL_LANGUAGE: false - VALIDATE_PYTHON_FLAKE8: false - VALIDATE_PYTHON_MYPY: false - VALIDATE_PYTHON_RUFF: false + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.ref || github.ref }} + - uses: super-linter/super-linter/slim@v6.5.1 + env: + # To report GitHub Actions status checks + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + GITHUB_ACTIONS_COMMAND_ARGS: '-ignore SC.*' + VALIDATE_BASH_EXEC: false + VALIDATE_CHECKOV: false + VALIDATE_HTML: false + VALIDATE_KUBERNETES_KUBECONFORM: false + VALIDATE_NATURAL_LANGUAGE: false + VALIDATE_PYTHON_FLAKE8: false + VALIDATE_PYTHON_MYPY: false + VALIDATE_PYTHON_RUFF: false diff --git a/.github/workflows/scorecard.yaml b/.github/workflows/scorecard.yaml index b56ec2ec0..240202a41 100644 --- a/.github/workflows/scorecard.yaml +++ b/.github/workflows/scorecard.yaml @@ -20,9 +20,9 @@ name: Scorecard supply-chain security on: branch_protection_rule: schedule: - - cron: '0 6 * * 0' + - cron: '0 6 * * 0' push: - branches: [ "main" ] + branches: ["main"] workflow_dispatch: permissions: read-all jobs: @@ -35,20 +35,20 @@ jobs: contents: read actions: read steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - uses: ossf/scorecard-action@v2.3.3 - with: - results_file: results.sarif - results_format: sarif - repo_token: ${{ secrets.ACTION_TOKEN }} - publish_results: true - - uses: actions/upload-artifact@v4 - with: - name: SARIF file - path: results.sarif - retention-days: 5 - - uses: github/codeql-action/upload-sarif@v3.25.3 - with: - sarif_file: results.sarif + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: ossf/scorecard-action@v2.3.3 + with: + results_file: results.sarif + results_format: sarif + repo_token: ${{ secrets.ACTION_TOKEN }} + publish_results: true + - uses: actions/upload-artifact@v4 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + - uses: github/codeql-action/upload-sarif@v3.25.3 + with: + sarif_file: results.sarif diff --git a/.github/workflows/test-runner-ci.yaml b/.github/workflows/test-runner-ci.yaml index 6704f1263..a0a80ddd9 100644 --- a/.github/workflows/test-runner-ci.yaml +++ b/.github/workflows/test-runner-ci.yaml @@ -15,7 +15,9 @@ name: Test Runner CI on: merge_group: null - pull_request: + pull_request_target: + types: [opened, edited, reopened, synchronize] + branches: [main] paths: - 'test-runner/**' push: @@ -23,7 +25,7 @@ on: - main permissions: read-all concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: unit-test: @@ -34,6 +36,8 @@ jobs: fail-fast: true steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || github.ref }} - uses: docker/setup-buildx-action@v3 with: driver: docker @@ -63,6 +67,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || github.ref }} - uses: actions/setup-python@v5 with: python-version: "3.10" @@ -91,6 +97,8 @@ jobs: runs-on: k8-runners steps: - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref || github.ref }} - uses: docker/setup-buildx-action@v3 with: driver: docker diff --git a/.github/workflows/weekly-test.yaml b/.github/workflows/weekly-test.yaml index eb1d966cc..c704e1e38 100644 --- a/.github/workflows/weekly-test.yaml +++ b/.github/workflows/weekly-test.yaml @@ -15,7 +15,7 @@ name: Weekly Tests on: schedule: - - cron: "0 0 * * 0" + - cron: "0 0 * * 0" workflow_dispatch: null permissions: read-all jobs: @@ -24,18 +24,18 @@ jobs: outputs: groups: ${{ steps.group-list.outputs.FOLDERS }} steps: - - uses: actions/checkout@v4 - - name: Output Group Directories - id: group-list - run: | - DOCKER_COMPOSE_PATHS=() - for path in $(find . -name 'docker-compose.yaml'); do - DIR_PATH=$(dirname "$path") - DOCKER_COMPOSE_PATHS+=("${DIR_PATH:2}") - done - # Convert the array to a JSON array - DOCKER_COMPOSE_PATHS_JSON=$(printf '%s\n' "${DOCKER_COMPOSE_PATHS[@]}" | uniq | jq -R '.' | jq -sc '.') - echo "FOLDERS=$DOCKER_COMPOSE_PATHS_JSON" >> $GITHUB_OUTPUT + - uses: actions/checkout@v4 + - name: Output Group Directories + id: group-list + run: | + DOCKER_COMPOSE_PATHS=() + for path in $(find . -name 'docker-compose.yaml'); do + DIR_PATH=$(dirname "$path") + DOCKER_COMPOSE_PATHS+=("${DIR_PATH:2}") + done + # Convert the array to a JSON array + DOCKER_COMPOSE_PATHS_JSON=$(printf '%s\n' "${DOCKER_COMPOSE_PATHS[@]}" | uniq | jq -R '.' | jq -sc '.') + echo "FOLDERS=$DOCKER_COMPOSE_PATHS_JSON" >> $GITHUB_OUTPUT pipeline-ci: needs: [get-groups] strategy: @@ -46,4 +46,5 @@ jobs: uses: ./.github/workflows/container-ci.yaml with: group_dir: ${{ matrix.group }} + ref: main secrets: inherit From 06318e916046923a5f76ca87049b3a2fcb91e2bc Mon Sep 17 00:00:00 2001 From: Tyler Titsworth Date: Thu, 30 May 2024 09:19:24 -0700 Subject: [PATCH 2/2] Report Coverage (#51) Signed-off-by: Tyler Titsworth --- .github/workflows/test-runner-ci.yaml | 25 +++++++++++-------------- README.md | 1 - tox.ini | 5 +++++ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test-runner-ci.yaml b/.github/workflows/test-runner-ci.yaml index a0a80ddd9..b8e9ae4e4 100644 --- a/.github/workflows/test-runner-ci.yaml +++ b/.github/workflows/test-runner-ci.yaml @@ -78,21 +78,18 @@ jobs: - name: Coverage run: | python -m pip install coverage - python -m coverage combine - echo -e "\`\`\`markdown\n$(python -m coverage report -i -m)\n\`\`\`" >> $GITHUB_STEP_SUMMARY - echo "total=$(python -m coverage report --format=total)" >> $GITHUB_ENV - - name: Update Badge - if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch) - uses: schneegans/dynamic-badges-action@v1.7.0 + python -m coverage combine --debug=pathmap + python -m coverage xml --skip-empty + - name: Comment on PR + uses: orgoro/coverage@v3.1 with: - auth: ${{ secrets.ACTIONS_TOKEN }} - gistID: 48dea0fc9a908a6e5ba5c5e84123bc02 - filename: coverage.json - label: Coverage - message: ${{ env.total }}% - minColorRange: 40 - maxColorRange: 80 - valColorRange: ${{ env.total }} + coverageFile: coverage.xml + token: ${{ secrets.ACTION_TOKEN }} + treshholdAll: 80 + - uses: actions/upload-artifact@v4 + with: + name: coverage.xml + path: coverage.xml integration-test: runs-on: k8-runners steps: diff --git a/README.md b/README.md index 66e5a46aa..7bf2a244d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ [![Test Runner CI](https://github.com/intel/ai-containers/actions/workflows/test-runner-ci.yaml/badge.svg)](https://github.com/intel/ai-containers/actions/workflows/test-runner-ci.yaml) [![Weekly Tests](https://github.com/intel/ai-containers/actions/workflows/weekly-test.yaml/badge.svg)](https://github.com/intel/ai-containers/actions/workflows/weekly-test.yaml) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/intel/ai-containers/main.svg)](https://results.pre-commit.ci/latest/github/intel/ai-containers/main) -[![coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/tylertitsworth/48dea0fc9a908a6e5ba5c5e84123bc02/raw/coverage.json)](https://gist.github.com/tylertitsworth/48dea0fc9a908a6e5ba5c5e84123bc02) This repository contains Dockerfiles, scripts, yaml files, Helm charts, etc. used to scale out AI containers with versions of TensorFlow and PyTorch that have been optimized for Intel platforms. Scaling is done with python, Docker, kubernetes, kubeflow, cnvrg.io, Helm, and other container orchestration frameworks for use in the cloud and on-premise. diff --git a/tox.ini b/tox.ini index 27ce87a9b..0a744034f 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,8 @@ env_list = py{38,39,310,311,312} coverage +source = + test-runner/* [testenv] deps = @@ -35,6 +37,9 @@ exclude_lines = if __name__ == "__main__": omit = utest.py +[coverage:combine] +relative_paths = true + [gh-actions] python = 3.8: py38