Skip to content

Commit

Permalink
[#6] Add Simple GradleBuild and Quality jobs with Slack Integration
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Oct 30, 2023
1 parent 7b295c6 commit f8f1305
Showing 1 changed file with 90 additions and 0 deletions.
90 changes: 90 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: TraceFit CI

on:
push:
branches:
- develop
pull_request:

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:

GradleBuild:
runs-on: macos-13
outputs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo
uses: actions/[email protected]
with:
submodules: 'recursive'
fetch-depth: 0

- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'

- name: Assemble
uses: gradle/[email protected]
with:
arguments: assemble

- name: Cancel other jobs if this fails
if: failure()
uses: andymckay/[email protected]

- name: Set Job Status
id: status
run: echo "status=success" >> $GITHUB_OUTPUT

Quality:
runs-on: macos-13
outputs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo
uses: actions/[email protected]
with:
submodules: 'recursive'

- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: 17
distribution: 'temurin'

- name: Run Quality Jobs
uses: gradle/[email protected]
with:
arguments: check

- name: Cancel other jobs if this fails
if: failure()
uses: andymckay/[email protected]

- name: Set Job Status
id: status
run: echo "status=success" >> $GITHUB_OUTPUT


Notify:
runs-on: ubuntu-latest
needs: [ GradleBuild, Quality]
if: always()
steps:

- name: Notify slack fail
if: false == (needs.GradleBuild.outputs.status == 'success') ||
false == (needs.Quality.outputs.status == 'success') ||
uses: voxmedia/[email protected]
with:
channel: ccc-github
status: FAILED
color: danger

0 comments on commit f8f1305

Please sign in to comment.