From 10435168f006c0db83c8520a0910b903eac62234 Mon Sep 17 00:00:00 2001 From: Timothy Pansino <11214426+TimPansino@users.noreply.github.com> Date: Wed, 21 Feb 2024 15:39:27 -0800 Subject: [PATCH] Fix Warnings in CI (#1071) * Chown pip cache to silence warning * Hardcode pip cache location * Add cache dir if not exists * Update actions versions to silence Node16 warnings * Run yaml linter * Running yaml linter --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- .github/workflows/build-ci-image.yml | 8 +- .github/workflows/deploy-python.yml | 4 +- .github/workflows/mega-linter.yml | 2 +- .github/workflows/tests.yml | 154 +++++++++++++++++++-------- 4 files changed, 114 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build-ci-image.yml b/.github/workflows/build-ci-image.yml index 9d60cea8ee..a1994aecdd 100644 --- a/.github/workflows/build-ci-image.yml +++ b/.github/workflows/build-ci-image.yml @@ -11,13 +11,13 @@ # 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: Build CI Image on: - workflow_dispatch: # Allow manual trigger + workflow_dispatch: # Allow manual trigger -concurrency: +concurrency: group: ${{ github.ref || github.run_id }} cancel-in-progress: true @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: persist-credentials: false fetch-depth: 0 diff --git a/.github/workflows/deploy-python.yml b/.github/workflows/deploy-python.yml index a579703034..71cfbdd673 100644 --- a/.github/workflows/deploy-python.yml +++ b/.github/workflows/deploy-python.yml @@ -11,7 +11,7 @@ # 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: Deploy on: @@ -129,7 +129,7 @@ jobs: deploy: runs-on: ubuntu-latest - needs: + needs: - build-linux-py3 - build-linux-py2 - build-sdist diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index cd0930507a..004a198cc8 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -25,7 +25,7 @@ jobs: steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} fetch-depth: 0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 572f902e81..866893137f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ # 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: Tests on: @@ -60,7 +60,7 @@ jobs: - tests steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: python-version: "3.10" @@ -122,15 +122,19 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -146,7 +150,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -167,15 +171,19 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -191,7 +199,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -212,7 +220,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: postgres: image: postgres:9 @@ -229,13 +236,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -251,7 +263,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -272,7 +284,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: mssql: image: mcr.microsoft.com/azure-sql-edge:latest @@ -292,13 +303,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -314,7 +330,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -335,7 +351,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: mysql: image: mysql:5.6 @@ -355,13 +370,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -377,7 +397,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -398,7 +418,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: redis1: image: hmstepanek/redis-cluster-node:1.0.0 @@ -454,13 +473,18 @@ jobs: --add-host=host.docker.internal:host-gateway steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -476,7 +500,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -497,7 +521,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: redis: image: redis @@ -512,13 +535,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -534,7 +562,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -555,7 +583,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: solr: image: bitnami/solr:8.8.2 @@ -572,13 +599,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -594,7 +626,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -615,7 +647,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: memcached: image: memcached @@ -630,13 +661,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -652,7 +688,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -673,7 +709,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: rabbitmq: image: rabbitmq @@ -689,13 +724,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -711,7 +751,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -732,7 +772,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: zookeeper: image: bitnami/zookeeper:3.9.1 @@ -759,13 +798,18 @@ jobs: KAFKA_CFG_INTER_BROKER_LISTENER_NAME: L3 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -781,7 +825,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -802,7 +846,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: mongodb: image: mongo:3.6.4 @@ -817,13 +860,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -839,7 +887,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -860,7 +908,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: elasticsearch: image: elasticsearch:7.17.8 @@ -877,13 +924,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -899,7 +951,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -920,7 +972,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: elasticsearch: image: elasticsearch:8.6.0 @@ -938,13 +989,18 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -960,7 +1016,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.* @@ -981,7 +1037,6 @@ jobs: options: >- --add-host=host.docker.internal:host-gateway timeout-minutes: 30 - services: firestore: # Image set here MUST be repeated down below in options. See comment below. @@ -1003,13 +1058,18 @@ jobs: # from every being executed as bash commands. steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Fetch git tags run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" git fetch --tags origin + - name: Configure pip cache + run: | + mkdir -p /github/home/.cache/pip + chown -R $(whoami) /github/home/.cache/pip + - name: Get Environments id: get-envs run: | @@ -1025,7 +1085,7 @@ jobs: PY_COLORS: 0 - name: Upload Coverage Artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-${{ github.job }}-${{ strategy.job-index }} path: ./**/.coverage.*