Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Purposes of changes: * Provided base GitHub Actions * Added coveralls: used fork till merge/release markusn/coveralls-erl#36 * Added 'elvis' call to GH Actions * Updated 'README': added GH Badges * Remove '.travis.yml' * Update 'rebar.config.script' based on GH Actions * Add 'rebar3' to '.gitignore' * Fix error for GH Action when tests running - {'EXIT',nodistribution} * Fix dialyzer warning: ------------------------------------------- src/metrics/prometheus_quantile_summary.erl 307: The created fun has no local return 346: The created fun has no local return 487: Function quantile_merge/2 has no local return 491: Record construction #quantile_estimator{samples_count::number(),data_count::'undefined',inserts_since_compression::'undefined',data::[#group{v::number(),g::number(),delta::number(),rank::number()}],invariant::fun()} violates the declared type of field data_count::number() and inserts_since_compression::number() -------------------------------------------
- Loading branch information
Showing
10 changed files
with
79 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: [ $default-branch ] | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
test: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
otp: [21.3, 22.3, 23.0.4, 23.2.7.0] | ||
container: | ||
image: erlang:${{ matrix.otp }}-alpine | ||
steps: | ||
- name: Prepare | ||
run: | | ||
apk update | ||
apk --no-cache upgrade | ||
apk --no-cache add gcc git libc-dev libc-utils libgcc linux-headers make bash | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: rebar3 compile | ||
- name: Run tests | ||
run: | | ||
./elvis rock --config elvis.config | ||
rebar3 xref | ||
rebar3 dialyzer | ||
rebar3 eunit | ||
- name: Coveralls | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: ${{ matrix.otp }} | ||
run: DEBUG=1 rebar3 as test coveralls send | ||
|
||
finish: | ||
needs: test | ||
runs-on: ubuntu-20.04 | ||
if: always() | ||
steps: | ||
- name: Coveralls Finished | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
curl -v -k https://coveralls.io/webhook \ | ||
--header "Content-Type: application/json" \ | ||
--data "{\"repo_name\":\"$GITHUB_REPOSITORY\",\"repo_token\":\"$GITHUB_TOKEN\",\"payload\":{\"build_num\":$GITHUB_RUN_ID,\"status\":\"done\"}}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ erl_crash.dump | |
logs | ||
_build | ||
/tmp | ||
rebar3 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
TravisConfig = case os:getenv("TRAVIS") of | ||
"true" -> | ||
JobId = os:getenv("TRAVIS_JOB_ID"), | ||
lists:keystore(coveralls_service_job_id, 1, CONFIG, {coveralls_service_job_id, JobId}); | ||
_ -> | ||
CONFIG | ||
end, | ||
|
||
case erlang:function_exported(rebar3, main, 1) of | ||
true -> % rebar3 | ||
lists:keystore(plugins, 1, TravisConfig, {plugins, [{rebar3_archive_plugin, "0.0.1"}]}); | ||
false -> % rebar 2.x or older | ||
lists:keystore(proto_opts, 1, TravisConfig, {proto_opts, [{src_dirs, []}]}) | ||
%% -*- erlang -*- | ||
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_commit_sha, os:getenv("GITHUB_SHA")}, | ||
{coveralls_flag_name, os:getenv("COVERALLS_FLAG_NAME")} | CONFIG], | ||
case os:getenv("GITHUB_EVENT_NAME") =:= "pull_request" | ||
andalso string:tokens(os:getenv("GITHUB_REF"), "/") of | ||
[_, "pull", PRNO, _] -> | ||
[{coveralls_service_pull_request, PRNO} | CONFIG1]; | ||
_ -> | ||
CONFIG1 | ||
end; | ||
_ -> | ||
CONFIG | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters