From 8018b71469399e42ba42661f542e9f4dd0d065ae Mon Sep 17 00:00:00 2001 From: azkaratea <164136436+azkaratea@users.noreply.github.com> Date: Mon, 7 Oct 2024 09:51:43 +0200 Subject: [PATCH] Create cached_tics.yml --- .github/workflows/cached_tics.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/cached_tics.yml diff --git a/.github/workflows/cached_tics.yml b/.github/workflows/cached_tics.yml new file mode 100644 index 0000000..7603763 --- /dev/null +++ b/.github/workflows/cached_tics.yml @@ -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 .