warnet-gi / WarnetBot

A bot for Warga Nusantara Teyvat (WARNET) discord server
https://discord.gg/warnet-gi
MIT License
7 stars 4 forks source link

Add code coverage GitHub action #107

Open rafiramadhana opened 1 year ago

rafiramadhana commented 1 year ago

Relates to https://github.com/warnet-gi/WarnetBot/pull/101

Add a github action to publish code coverage using orgoro/coverage@v3.1.

rafiramadhana commented 1 year ago

@Iqrar99 it looks like we have issue with the PR permissions/token stuff

HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/orgoro/coverage/v3.1/webpack:/typescript-action/node_modules/@octokit/request/dist-node/index.js:86:1
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

https://github.com/warnet-gi/WarnetBot/actions/runs/6684030106/job/18160849228?pr=107

do you have any clue? ty

Iqrar99 commented 1 year ago

Hello @rafiramadhana, I have changed the default permission for GitHub Actions to be able doing read and write. Please give it a try again

image
rafiramadhana commented 1 year ago

@Iqrar99 Btw I just realised that I might hit the maximum access for pull requests from public forked repositories because I am using a forked repo.

I've done a small proof of concept using my own repo, and it succeed (https://github.com/rafiramadhana/python-cicd/pull/4).

To solve this, I think you can try to do the PR by yourself using my commit.

rafiramadhana commented 1 year ago

@Iqrar99 I've squashed the commits to ease the cherry-pick. LMK if you have concerns or anything. Tx!

Iqrar99 commented 1 year ago

Thank you. I'll do it later.