Skip to content

TICS Analysis

TICS Analysis #16

Workflow file for this run

name: TICS Analysis
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # runs every sunday at 00:00
pull_request:
paths:
- .github/workflows/tics.yaml
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
TICS:
permissions:
contents: read
runs-on: [self-hosted, linux, amd64, tiobe, jammy]
steps:
- name: Checking out repo
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: go mod download
run: |
go mod download
- name: Prepare Go coverage and build
run: |
set -ex
# TICS requires us to have the test results in cobertura xml format under the
# directory use below
sudo env "PATH=$PATH" make test-unit
go install github.com/boumenot/gocover-cobertura@latest
gocover-cobertura < cover_all.out > coverage.xml
mkdir .coverage
mv ./coverage.xml ./.coverage/
# Install staticcheck
go install honnef.co/go/tools/cmd/[email protected]
# We need to have our project built
# We load the dqlite libs here instead of doing through make because TICS
# will try to build parts of the project itself
go build -a ./...
- name: Run TICS
uses: tiobe/tics-github-action@v3
with:
mode: qserver
project: ${{ github.event.repository.name }}
viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=GoProjects
ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }}
installTics: true