Skip to content

Commit

Permalink
ci(cover): fix coveralls interaction
Browse files Browse the repository at this point in the history
coverallsapp issues/178
  • Loading branch information
qzhuyan committed Jun 9, 2023
1 parent 63e0e93 commit efe557d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cover.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ jobs:
make cover
- name: Coveralls C
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-c-lcov
parallel: true
git-branch: ${{ github.ref_name }}
git-commit: ${{ github.sha }}

- name: Coveralls Erl
if: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: rebar3 as test coveralls send

- name: Coveralls Finished
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@


%% Coveralls
{plugins , [coveralls]}. % use hex package
{plugins , [{coveralls, {git, "https://github.com/qzhuyan/coveralls-erl", {branch, "qzhuyan"}}}]}.
{cover_enabled , true}.
{cover_excl_mods, [qt, qt_ssl, rev, user_default]}.
{cover_export_enabled , true}.
Expand Down
4 changes: 3 additions & 1 deletion rebar.config.script
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
case {os:getenv("GITHUB_ACTIONS"), os:getenv("GITHUB_TOKEN")} of
{"true", Token} when is_list(Token) ->
CONFIG1 = [{coveralls_repo_token, Token},
{coveralls_service_job_id, os:getenv("GITHUB_RUN_ID")},
{coveralls_service_number, os:getenv("GITHUB_RUN_ID")},
{coveralls_commit_sha, os:getenv("GITHUB_SHA")},
{coveralls_parallel, true},
{coveralls_flag_name, "erlang"},
{coveralls_service_name, "github"} | CONFIG],
case os:getenv("GITHUB_EVENT_NAME") =:= "pull_request"
andalso string:tokens(os:getenv("GITHUB_REF"), "/") of
Expand Down

0 comments on commit efe557d

Please sign in to comment.