Skip to content

Commit

Permalink
Create cached_tics.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
azkaratea authored Oct 7, 2024
1 parent d8f0154 commit 8018b71
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cached_tics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: TICS run (script)

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout the project
uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get update

- uses: actions/cache@v4
id: cache-tics
with:
path: |
/home/runner/
/var/tmp/runner/tics/
key: ${{ runner.os }}-tics

- name: Download and install TICS artifactory
if: steps.cache-tics.outputs.cache-hit != 'false'
run: |
set -x
export TICSAUTHTOKEN="${{ secrets.TICSAUTHTOKEN }}"
# Download TICS
curl --silent --show-error "https://canonical.tiobe.com/tiobeweb/TICS/api/public/v1/fapi/installtics/Script?cfg=default&platform=linux&url=https://canonical.tiobe.com/tiobeweb/TICS/" > install_tics.sh
# Install TICS
. ./install_tics.sh
- name: Execute TICS analysis
if: steps.cache-tics.outputs.cache-hit != 'true'
run: |
set -x
export TICSAUTHTOKEN="${{ secrets.TICSAUTHTOKEN }}"
source /home/runner/.profile
TICSQServer -project testimage -tmpdir /tmp/tics -branchdir .

0 comments on commit 8018b71

Please sign in to comment.