This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/migrate to GitHub actions (#278)
* Build: Add Configuration for GitHub Actions and remove the Travis-CI.org configuration
- Loading branch information
1 parent
e35bfda
commit 8861632
Showing
7 changed files
with
914 additions
and
58 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,41 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- master | ||
schedule: | ||
- cron: "0 22 * * 1" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew check build buildDashboard generateAggregatedReports -x integrationTest --continue | ||
- name: Test and publish coverage to Coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: ./gradlew coverallsJacoco | ||
- name: Slack notification when master build fails | ||
if: ${{ failure() && github.ref == 'refs/heads/master'}} | ||
uses: rtCamp/[email protected] | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: cerberus-alerts | ||
SLACK_MESSAGE: 'Cerberus main build has failed :build-failed:' | ||
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png | ||
SLACK_TITLE: Cerberus Build Failure Notification | ||
SLACK_USERNAME: GitHub Actions |
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,54 @@ | ||
# This workflow will build a Java project with Gradle | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | ||
|
||
name: Release | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
jobs: | ||
Build-and-Release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew check build buildDashboard generateAggregatedReports -x integrationTest --continue | ||
- name: Test and publish coverage to Coveralls | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
run: ./gradlew coverallsJacoco | ||
- name: Release artifact to Bintray | ||
env: | ||
BINTRAY_USER: ${{ secrets.BINTRAY_USER }} | ||
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY}} | ||
run: ./gradlew bintrayUpload | ||
- name: Upload binary to GitHub release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: cerberus-web/build/libs/cerberus.jar | ||
tag: ${{ github.ref }} | ||
- name: Upload checksum to GitHub release | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: cerberus-web/build/libs/cerberus.jar.MD5 | ||
tag: ${{ github.ref }} | ||
- name: Slack notification when release fails | ||
if: ${{ failure() }} | ||
uses: rtCamp/[email protected] | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
SLACK_CHANNEL: cerberus-alerts | ||
SLACK_MESSAGE: 'Cerberus release workflow has failed :build-failed:' | ||
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png | ||
SLACK_TITLE: Cerberus Build Failure Notification | ||
SLACK_USERNAME: GitHub Actions |
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
Oops, something went wrong.