-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from yuce/gha
Migrate from Travis to GitHub Actions
- Loading branch information
Showing
6 changed files
with
41 additions
and
16 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,24 @@ | ||
--- | ||
name: "build" | ||
on: | ||
push: | ||
branches: | ||
- "master" | ||
pull_request: | ||
branches: | ||
- "master" | ||
jobs: | ||
ci: | ||
name: "Run checks, tests, and docs over ${{matrix.otp_vsn}} and ${{matrix.os}}" | ||
runs-on: "${{matrix.os}}" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
container: | ||
image: "erlang:${{matrix.otp_vsn}}" | ||
strategy: | ||
matrix: | ||
otp_vsn: ["19.3", "21.3", "22.3", "23.2"] # omitting 20.3 due to TLS issue | ||
os: ["ubuntu-latest"] | ||
steps: | ||
- uses: "actions/checkout@v2" | ||
- run: "make coveralls" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
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}); | ||
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. | ||
end. |