Skip to content

Commit 03598a4

Browse files
[DPE-6218] Static code analysis (#828)
* Create tiobe_scan.yaml * Remove push trigger
1 parent 7897bfc commit 03598a4

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/tiobe_scan.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Copyright 2025 Canonical Ltd.
2+
# See LICENSE file for licensing details.
3+
4+
name: Weekly TICS scan
5+
6+
on:
7+
schedule:
8+
- cron: "0 2 * * 6" # Every Saturday 2:00 AM UTC
9+
workflow_dispatch:
10+
11+
jobs:
12+
TICS:
13+
runs-on: ubuntu-24.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Create and activate virtual environment
19+
run: |
20+
python3 -m venv .venv
21+
. .venv/bin/activate
22+
pip install flake8 poetry pylint pytest tox
23+
poetry install --all-groups
24+
echo PATH="$PATH" >> "$GITHUB_ENV"
25+
26+
- name: Run coverage tests
27+
run: |
28+
tox -e unit
29+
30+
- name: Move results to the necessary folder for TICS
31+
run: |
32+
mkdir -p .cover
33+
mv coverage.xml .cover/cobertura.xml
34+
35+
- name: TICS GitHub Action
36+
uses: tiobe/tics-github-action@v3
37+
with:
38+
mode: qserver
39+
project: postgresql-operator
40+
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default
41+
branchdir: ${{ env.GITHUB_WORKSPACE }}
42+
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }}
43+
installTics: true
44+
calc: ALL

0 commit comments

Comments
 (0)