From dd144d709d7473a438d9f075112b36b368125ec4 Mon Sep 17 00:00:00 2001 From: Peter Makowski Date: Tue, 11 Jun 2024 10:05:52 +0200 Subject: [PATCH] ci: add TICS workflow with artifact upload MAASENG-3276 Signed-off-by: Peter Makowski --- .github/workflows/test.yml | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f393775459..cb279cbf13 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: - name: Use Node.js from .nvmrc uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: Install if: steps.yarn-cache.outputs.cache-hit != 'true' run: CYPRESS_INSTALL_BINARY=0 yarn install @@ -40,7 +40,7 @@ jobs: - name: Use Node.js from .nvmrc uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: Install if: steps.yarn-cache.outputs.cache-hit != 'true' run: CYPRESS_INSTALL_BINARY=0 yarn install @@ -83,6 +83,31 @@ jobs: id: deployment uses: actions/deploy-pages@v4 + tics-report: + name: TICS Report + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + - name: Run TICS Analyzer + uses: tiobe/tics-github-action@v3 + with: + mode: qserver + project: maas-ui + viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default + ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} + installTics: true + tmpdir: /tmp/tics + branchdir: . + + - name: Upload TICS Report + if: always() + uses: actions/upload-artifact@v4 + with: + name: tics-report + path: /tmp/tics/ticstmpdir + retention-days: 7 + build: name: Build timeout-minutes: 15 @@ -98,7 +123,7 @@ jobs: - name: Use Node.js from .nvmrc uses: actions/setup-node@v4 with: - node-version-file: '.nvmrc' + node-version-file: ".nvmrc" - name: Install if: steps.yarn-cache.outputs.cache-hit != 'true' run: CYPRESS_INSTALL_BINARY=0 yarn install