Skip to content

Commit ac1fe37

Browse files
authored
[DPE-6543] add TICS workflow (#388)
* add TICS workflow * add ability to test * update project * remove push trigger
1 parent c17a2ce commit ac1fe37

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/actionlint.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
self-hosted-runner:
2+
labels:
3+
- self-hosted
4+
- linux
5+
- amd64
6+
- tiobe
7+
- jammy
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: TICS run self-hosted test (github-action)
2+
3+
on:
4+
workflow_dispatch: # Allows manual triggering
5+
6+
jobs:
7+
build:
8+
runs-on: [self-hosted, linux, amd64, tiobe, jammy]
9+
10+
steps:
11+
- name: Checkout the project
12+
uses: actions/checkout@v4
13+
14+
- name: Install system dependencies
15+
run: sudo apt-get update && sudo apt-get install -y python3.10-venv
16+
17+
- name: Install pipx
18+
run: python3 -m pip install --user pipx && python3 -m pipx ensurepath
19+
20+
- name: Add pipx to PATH
21+
run: echo "${HOME}/.local/bin" >> "${GITHUB_PATH}"
22+
23+
- name: Install tox and poetry using pipx
24+
run: |
25+
pipx install tox
26+
pipx install poetry
27+
28+
- name: Run tox tests to create coverage.xml
29+
run: tox run -e unit
30+
31+
- name: move results to necessary folder for TICS
32+
run: |
33+
mkdir .cover
34+
mv coverage.xml .cover/coverage.xml
35+
36+
- name: Run TICS analysis with github-action
37+
uses: tiobe/tics-github-action@v3
38+
with:
39+
mode: qserver
40+
project: mongodb-k8s-operator
41+
branchdir: .
42+
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default
43+
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }}
44+
installTics: true

0 commit comments

Comments
 (0)