From 040b3ff3e6c3a3d988017487864b740047082ebb Mon Sep 17 00:00:00 2001 From: Marcelo Henrique Neppel Date: Wed, 9 Apr 2025 16:10:20 -0300 Subject: [PATCH 1/2] Create tiobe_scan.yaml --- .github/workflows/tiobe_scan.yaml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/tiobe_scan.yaml diff --git a/.github/workflows/tiobe_scan.yaml b/.github/workflows/tiobe_scan.yaml new file mode 100644 index 0000000000..155b871baf --- /dev/null +++ b/.github/workflows/tiobe_scan.yaml @@ -0,0 +1,45 @@ +# Copyright 2025 Canonical Ltd. +# See LICENSE file for licensing details. + +name: Weekly TICS scan + +on: + push: + schedule: + - cron: "0 2 * * 6" # Every Saturday 2:00 AM UTC + workflow_dispatch: + +jobs: + TICS: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Create and activate virtual environment + run: | + python3 -m venv .venv + . .venv/bin/activate + pip install flake8 poetry pylint pytest tox + poetry install --all-groups + echo PATH="$PATH" >> "$GITHUB_ENV" + + - name: Run coverage tests + run: | + tox -e unit + + - name: Move results to the necessary folder for TICS + run: | + mkdir -p .cover + mv coverage.xml .cover/cobertura.xml + + - name: TICS GitHub Action + uses: tiobe/tics-github-action@v3 + with: + mode: qserver + project: postgresql-operator + viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default + branchdir: ${{ env.GITHUB_WORKSPACE }} + ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} + installTics: true + calc: ALL From 74d3e31fa51d2b9708e04fd248c152d5fc4cc71e Mon Sep 17 00:00:00 2001 From: Marcelo Henrique Neppel Date: Wed, 9 Apr 2025 16:46:27 -0300 Subject: [PATCH 2/2] Remove push trigger --- .github/workflows/tiobe_scan.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tiobe_scan.yaml b/.github/workflows/tiobe_scan.yaml index 155b871baf..b81b022ef0 100644 --- a/.github/workflows/tiobe_scan.yaml +++ b/.github/workflows/tiobe_scan.yaml @@ -4,7 +4,6 @@ name: Weekly TICS scan on: - push: schedule: - cron: "0 2 * * 6" # Every Saturday 2:00 AM UTC workflow_dispatch: