-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
vkatsuba
committed
Feb 25, 2021
1 parent
f63ff4f
commit a2919c9
Showing
8 changed files
with
74 additions
and
46 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 @@ | ||
* @travelping/erlang-devs |
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,49 @@ | ||
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.8.18, 22.0.7, 22.1.8, 22.2.8, 22.3.4.14, 23.0.4, 23.1.5.0, 23.2.1.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 \ | ||
musl-dev musl-utils ncurses-dev pcre2 pkgconf scanelf wget zlib | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: DEBUG=1 rebar3 compile | ||
- name: Run tests | ||
run: | | ||
rebar3 do xref | ||
rebar3 do ct | ||
- name: Coveralls | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: DEBUG=1 rebar3 as test coveralls send || /bin/true | ||
|
||
finish: | ||
needs: test | ||
runs-on: ubuntu-20.04 | ||
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_NUMBER,\"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 |
---|---|---|
|
@@ -5,3 +5,5 @@ _build/ | |
.arcconfig | ||
tetrapak/.local.cache | ||
*~ | ||
rebar3 | ||
rebar.lock |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
%% -*- Erlang -*- | ||
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 | ||
%% -*- 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_service_number, os:getenv("GITHUB_RUN_NUMBER")} | 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. |