1. Travis with Gradle - sftth/travis GitHub Wiki
1. ๊ฐ์
- Travis๋ฅผ ํ์ฉํ์ฌ ํ๋ก์ ํธ ๋น๋, ํ ์คํธ์ปค๋ฒ๋ฆฌ์ง ํด ์ฐ๋, ํ ๋ ๊ทธ๋จ ๋ด ์ฐ๋ ์ํ
2. ํ๋ก์ ํธ ์์ฑ
- IntelliJ > File > New > Project
3. Github(Repository) ๊ณต์
- VCS > Import into version control > Share Project on Github
4. Travis ์ฐ๋
- travis-ci.org > login with Github๋ก ์ ์
- Repository ์ ํ ๋ฐ ํ์ฑํ
- .travis.yml ์์ฑ
language: java jdk: - openjdk8 before_install: - chmod +x gradlew branches: only: - master #Travis CI ์๋ฒ Cache ํ์ฑํ cache: directories: - '$HOME/.m2/repository' - '$HOME/.gradle' #clean ํ Build(Build์ ์๋์ผ๋ก test ์ํ) script: "./gradlew clean build" after_success: - ./gradlew jacocoTestReport coveralls notifications: webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
- ๋น๋ ์ํ ๋ผ๋ฒจ ๋ณต์ฌ
- ๋น๋ ์ํ ๋ผ๋ฒจ ํด๋ฆญ > Markdown ๋ณต์ฌ
- Github README.md์ ๋ณต์ฌ
5. Coverall ์ฐ๋
- ๊ฐ์
- ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ๊ด๋ฆฌ ์น ์๋น์ค
- ํ ์คํธ ์ปค๋ฒ๋ฆฌ์ง ์ธก์ ๋๊ตฌ(jacoco)์คํ > coveralls๋ก ๊ฒฐ๊ณผ ์ ์ก > coveralls์ ๊ฒฐ๊ณผ๋ฅผ ํต๊ณ๋ก ๋จ๊น
- Github๋ก ๋ก๊ทธ์ธ
- Sync Repos > On > Details > repo_token ๋ณต์ฌ
- ํ
์คํธ ์ปค๋ฒ๋ฆฌ์ง ์ธก์ ๋๊ตฌ(jacoco)๋ฅผ Gradle์ ์ถ๊ฐ
- build.gradle ์ฝ๋ ์ถ๊ฐ
plugins { ... id 'jacoco' id 'com.github.kt3k.coveralls' version '2.8.4' } ... jacocoTestReport{ reports{ xml.enabled = true html.enabled = true } }
- build.gradle ์ฝ๋ ์ถ๊ฐ
- .coveralls.yml ํ์ผ ์์ฑ > repo_token ๋ฑ๋ก
repo_token: ${ํ ํฐํค}
6. Telegram bot ์ฐ๋
- ํ ๋ ๊ทธ๋จ ์ฑ ์ค์น
- ์ฐ๋ฝ์ฒ์์ Travis CI ๊ฒ์
- /start ์ ๋ ฅ
- /link ์ ๋ ฅ
- user/repo ์ ๋ ฅ
- Public ์ ๋ ฅ
- .travis.yml์ ์๋ ๋ผ์ธ ์ถ๊ฐ
notifications: webhooks: https://####-####-#####.####.com/notify
- Private chat ์ ๋ ฅ
- ์ดํ ๋น๋ ํ ๊ฒฐ๊ณผ push ๋จ