Skip to content

Commit

Permalink
Add GitHub action to upload TICS report to TIOBE
Browse files Browse the repository at this point in the history
  • Loading branch information
bartaz committed May 16, 2024
1 parent 407add1 commit 7ceb6af
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/tics-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Upload TICS report
on:
pull_request:
types: [opened, edited, synchronize, reopened]
# push:
# branches:
# - main

jobs:
tics-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Install dependencies
run: yarn install
- name: Lint
run: yarn lint

- name: Build
run: yarn build

- name: Test
run: yarn test --coverage
env:
CI: true

- name: Produce TICS report
shell: bash
run: |
set -x
export TICSAUTHTOKEN=${{ secrets.TICS_AUTH_TOKEN }}
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.sh
TICSQServer -project react-components -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

0 comments on commit 7ceb6af

Please sign in to comment.