From 71936c2415b10d0939e0469e166e2e0f6350f0a6 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Tue, 27 Aug 2024 17:32:12 +1200 Subject: [PATCH 1/3] Add a monthly (or on demand) TIOBE reporting workflow. --- .github/workflows/tiobe.yaml | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/tiobe.yaml diff --git a/.github/workflows/tiobe.yaml b/.github/workflows/tiobe.yaml new file mode 100644 index 00000000..b0d9c768 --- /dev/null +++ b/.github/workflows/tiobe.yaml @@ -0,0 +1,39 @@ +name: TIOBE Quality Checks + +on: + workflow_dispatch: + schedule: + - cron: '0 7 1 * *' + +jobs: + TICS: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + + - name: Install dependencies + run: | + go install honnef.co/go/tools/cmd/staticcheck@v0.5.1 + go get github.com/axw/gocov/gocov + go get github.com/AlekSi/gocov-xml + + # We could store a report from the regular run, but this is cheap to do and keeps this isolated. + - name: Test and generate coverage report + run: | + go test -race -coverprofile=coverage.out ./... + gocov convert coverage.out > coverage.json + # Annoyingly, the coverage.xml file needs to be in a .coverage folder. + mkdir .coverage + gocov-xml < coverage.json > .coverage/coverage.xml + + - name: TICS GitHub Action + uses: tiobe/tics-github-action@v3 + with: + mode: qserver + viewerUrl: https://canonical.tiobe.com/tiobeweb/TICS/api/cfg?name=default + ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} + project: pebble + installTics: true From eb5405eabc87cf9f91b8aab2fb118a711e03ccd0 Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Wed, 28 Aug 2024 12:50:33 +1200 Subject: [PATCH 2/3] Update .github/workflows/tiobe.yaml Co-authored-by: Ben Hoyt --- .github/workflows/tiobe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tiobe.yaml b/.github/workflows/tiobe.yaml index b0d9c768..8cfd475d 100644 --- a/.github/workflows/tiobe.yaml +++ b/.github/workflows/tiobe.yaml @@ -17,8 +17,8 @@ jobs: - name: Install dependencies run: | go install honnef.co/go/tools/cmd/staticcheck@v0.5.1 - go get github.com/axw/gocov/gocov - go get github.com/AlekSi/gocov-xml + go install github.com/axw/gocov/gocov@v1.1.0 + go install github.com/AlekSi/gocov-xml@v1.1.0 # We could store a report from the regular run, but this is cheap to do and keeps this isolated. - name: Test and generate coverage report From 3821d685fabb52dfb7f0d5c26c9ff0aedf180fbd Mon Sep 17 00:00:00 2001 From: Tony Meyer Date: Wed, 28 Aug 2024 12:51:27 +1200 Subject: [PATCH 3/3] Remove race detector, per review suggestion. --- .github/workflows/tiobe.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tiobe.yaml b/.github/workflows/tiobe.yaml index 8cfd475d..1bc3d71c 100644 --- a/.github/workflows/tiobe.yaml +++ b/.github/workflows/tiobe.yaml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 - + - name: Install dependencies run: | go install honnef.co/go/tools/cmd/staticcheck@v0.5.1 @@ -23,7 +23,7 @@ jobs: # We could store a report from the regular run, but this is cheap to do and keeps this isolated. - name: Test and generate coverage report run: | - go test -race -coverprofile=coverage.out ./... + go test -coverprofile=coverage.out ./... gocov convert coverage.out > coverage.json # Annoyingly, the coverage.xml file needs to be in a .coverage folder. mkdir .coverage