Update tiobe/tics-github-action action to v3.9.0 #283
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TICS | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| merge_group: | |
| types: [checks_requested] | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| TICS: | |
| permissions: | |
| contents: read | |
| # Only run if we have access to secrets. | |
| if: github.event_name != 'pull_request' || github.repository == github.event.pull_request.head.repo.full_name | |
| runs-on: [self-hosted, reactive, amd64, tiobe, noble] | |
| env: | |
| NEEDRESTART_SUSPEND: yes | |
| DEBIAN_FRONTEND: noninteractive | |
| TICS_CHANGED_LIST: tics_changed.list | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 2 | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: | | |
| sudo add-apt-repository --yes ppa:mir-team/dev | |
| sudo apt install --yes \ | |
| build-essential \ | |
| cmake \ | |
| google-mock \ | |
| libboost-dev \ | |
| libgtest-dev \ | |
| libwayland-dev \ | |
| ninja-build \ | |
| pkg-config | |
| - name: Build | |
| run: | | |
| cmake -Bbuild -GNinja . | |
| cmake --build build | |
| - name: Get changed files | |
| if: github.event_name == 'merge_group' | |
| run: | | |
| # Every merge_group event runs for one pull request, so we can diff against parent | |
| git diff --name-only ${{ github.sha }}~1 ${{ github.sha }} >> $TICS_CHANGED_LIST | |
| - name: Run TICS analysis | |
| uses: tiobe/tics-github-action@7901970b6e31982ab7c88b61ee28cac29b750395 # v3.9.0 | |
| with: | |
| mode: ${{ contains(fromJSON('["pull_request", "merge_group"]'), github.event_name) && 'client' || 'qserver' }} | |
| project: wlcs | |
| viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default | |
| ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} | |
| installTics: true | |
| filelist: ${{ github.event_name == 'merge_group' && env.TICS_CHANGED_LIST || '' }} | |
| # FIXME: workaround for a TICS bug | |
| additionalFlags: ${{ contains(fromJSON('["pull_request", "merge_group"]'), github.event_name) && '-resultdir build' || '' }} | |
| - if: ${{ failure() && runner.debug }} | |
| name: Setup tmate session | |
| uses: canonical/action-tmate@bda82e73586a62bf621881aab872a527c8a46e2d # main @ 2026-03-02 | |
| with: | |
| limit-access-to-actor: true |