Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add GitHub action to upload TICS report to TIOBE #1087

Merged
merged 1 commit into from
May 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/tics-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Upload TICS report
on:
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

Comment on lines +18 to +23
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably could remove these from this job.

- 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
Loading