-
Notifications
You must be signed in to change notification settings - Fork 4
54 lines (48 loc) · 2.09 KB
/
tics.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This file is centrally managed as a template file in https://github.com/canonical/solutions-engineering-automation
# To update the file:
# - Edit it in the canonical/solutions-engineering-automation repository.
# - Open a PR with the changes.
# - When the PR merges, the soleng-terraform bot will open a PR to the target repositories with the changes.
name: TICS
on:
workflow_dispatch:
push:
branches:
- main
jobs:
tics-analysis:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: |
sudo apt update
python -m pip install --upgrade pip
# pin tox to the current major version to avoid
# workflows breaking all at once when a new major version is released.
python -m pip install 'tox<5'
# The snap is built already in the check workflow and available as an artifact,
# but we want this TICS workflow to be independent,
# so we can run the workflow periodically or on demand.
- name: Build the snap
id: build
uses: canonical/action-build@v1
- name: Test with tox and produce coverage report
# Create an environment in /tmp for the TICS action to use.
run: tox --workdir /tmp/tox -e tics
- name: Run TICS analysis
uses: tiobe/tics-github-action@v3
env:
# TICS action requires all the project's dependencies to be present to run the analysis.
# Add the the tox bin directory to the PATH so that the TICS action can find the tests dependencies.
# Other paths are added to the PATH to make sure that the TICS action can find the required binaries.
PATH: "/tmp/tox/tics/bin:/snap/bin:/home/runner/.local/bin:/home/runner/.cargo/bin:/bin:/usr/bin:/usr/local/bin:"
with:
mode: qserver
project: dcgm-snap
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default
branchdir: ${{ github.workspace }}
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }}
installTics: true