Skip to content

Commit

Permalink
[#185] Codecov reporting bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaozhan committed Nov 5, 2021
1 parent b6cbf22 commit 889d098
Showing 1 changed file with 118 additions and 118 deletions.
236 changes: 118 additions & 118 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,98 +29,98 @@ env:

jobs:

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

- name: Clone Repo
uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Adding secret files
run: |
echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
mkdir android/src/release
echo "${{ secrets.ANDROID_GPG_FIREBASE_CONFIG }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
echo "${{ secrets.IOS_GPG_FIREBASE_CONFIG }}" > GoogleService-Info.plist.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch GoogleService-Info.plist.asc > ios/CCC/Resources/GoogleService-Info.plist
echo "${{ secrets.IOS_GPG_RELEASE_XCCONFIG }}" > Release.xcconfig.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch Release.xcconfig.asc > ios/CCC/Resources/Release.xcconfig
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Gradle Build
run: ./gradlew build --parallel

- name: Set Job Status
id: status
run: echo "::set-output name=status::success"

XCodeBuild:
runs-on: macos-latest
outputs:
status: ${{ steps.status.outputs.status }}
steps:

- name: Clone Repo
uses: actions/checkout@v2

- name: Checkout submodules
run: git submodule update --init --recursive

- name: Adding secret files
run: |
echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
mkdir android/src/release
echo "${{ secrets.ANDROID_GPG_FIREBASE_CONFIG }}" > google-services.json.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
echo "${{ secrets.IOS_GPG_FIREBASE_CONFIG }}" > GoogleService-Info.plist.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch GoogleService-Info.plist.asc > ios/CCC/Resources/GoogleService-Info.plist
echo "${{ secrets.IOS_GPG_RELEASE_XCCONFIG }}" > Release.xcconfig.asc
gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch Release.xcconfig.asc > ios/CCC/Resources/Release.xcconfig
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest

- name: Install Cocoapods
run: |
./gradlew client:podGenIOS
cd ios/CCC
pod install
- name: Xcode build
run: cd ios &&
xcrun xcodebuild
-workspace CCC.xcworkspace
-scheme CCC
-sdk iphoneos
-derivedDataPath
build
CODE_SIGN_IDENTITY=""
CODE_SIGNING_REQUIRED="NO"
CODE_SIGN_ENTITLEMENTS=""
CODE_SIGNING_ALLOWED="NO"

- name: Set Job Status
id: status
run: echo "::set-output name=status::success"
# GradleBuild:
# runs-on: macos-latest
# outputs:
# status: ${{ steps.status.outputs.status }}
# steps:
#
# - name: Clone Repo
# uses: actions/checkout@v2
#
# - name: Checkout submodules
# run: git submodule update --init --recursive
#
# - name: Adding secret files
# run: |
# echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
# mkdir android/src/release
# echo "${{ secrets.ANDROID_GPG_FIREBASE_CONFIG }}" > google-services.json.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
# echo "${{ secrets.IOS_GPG_FIREBASE_CONFIG }}" > GoogleService-Info.plist.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch GoogleService-Info.plist.asc > ios/CCC/Resources/GoogleService-Info.plist
# echo "${{ secrets.IOS_GPG_RELEASE_XCCONFIG }}" > Release.xcconfig.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch Release.xcconfig.asc > ios/CCC/Resources/Release.xcconfig
#
# - name: Set up JDK 11
# uses: actions/setup-java@v1
# with:
# java-version: 11
#
# - name: Gradle Build
# run: ./gradlew build --parallel
#
# - name: Set Job Status
# id: status
# run: echo "::set-output name=status::success"
#
# XCodeBuild:
# runs-on: macos-latest
# outputs:
# status: ${{ steps.status.outputs.status }}
# steps:
#
# - name: Clone Repo
# uses: actions/checkout@v2
#
# - name: Checkout submodules
# run: git submodule update --init --recursive
#
# - name: Adding secret files
# run: |
# echo "${{ secrets.ANDROID_GPG_RELEASE_KEYSTORE }}" > release.keystore.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch release.keystore.asc > android/release.keystore
# mkdir android/src/release
# echo "${{ secrets.ANDROID_GPG_FIREBASE_CONFIG }}" > google-services.json.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch google-services.json.asc > android/src/release/google-services.json
# echo "${{ secrets.IOS_GPG_FIREBASE_CONFIG }}" > GoogleService-Info.plist.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch GoogleService-Info.plist.asc > ios/CCC/Resources/GoogleService-Info.plist
# echo "${{ secrets.IOS_GPG_RELEASE_XCCONFIG }}" > Release.xcconfig.asc
# gpg -d --passphrase "${{ secrets.GPG_PASSWORD }}" --batch Release.xcconfig.asc > ios/CCC/Resources/Release.xcconfig
#
# - name: Set up JDK 11
# uses: actions/setup-java@v1
# with:
# java-version: 11
#
# - name: Set up Xcode
# uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: latest
#
# - name: Install Cocoapods
# run: |
# ./gradlew client:podGenIOS
# cd ios/CCC
# pod install
#
# - name: Xcode build
# run: cd ios &&
# xcrun xcodebuild
# -workspace CCC.xcworkspace
# -scheme CCC
# -sdk iphoneos
# -derivedDataPath
# build
# CODE_SIGN_IDENTITY=""
# CODE_SIGNING_REQUIRED="NO"
# CODE_SIGN_ENTITLEMENTS=""
# CODE_SIGNING_ALLOWED="NO"
#
# - name: Set Job Status
# id: status
# run: echo "::set-output name=status::success"

Kover:
runs-on: macos-latest
Expand All @@ -147,34 +147,34 @@ jobs:
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: client/build/reports/kover/report.xml, common/build/reports/kover/report.xml, scopemob/build/reports/kover/report.xml, parsermob/build/reports/kover/report.xml
files: client/build/reports/kover/report.xml, common/build/reports/kover/report.xml, scopemob/scopemob/build/reports/kover/report.xml, parsermob/parsermob/build/reports/kover/report.xml

- name: Set Job Status
id: status
run: echo "::set-output name=status::success"

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

- name: Notify slack success
if: needs.GradleBuild.outputs.status == 'success' && needs.XCodeBuild.outputs.status == 'success' && needs.Kover.outputs.status == 'success'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ccc
status: SUCCESS
color: good

- name: Notify slack fail
if: false == (needs.GradleBuild.outputs.status == 'success') || false == (needs.XCodeBuild.outputs.status == 'success') || false == (needs.Kover.outputs.status == 'success')
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel: ccc
status: FAILED
color: danger
# Notify:
# runs-on: ubuntu-latest
# needs: [ GradleBuild, XCodeBuild, Kover ]
# if: always()
# steps:
#
# - name: Notify slack success
# if: needs.GradleBuild.outputs.status == 'success' && needs.XCodeBuild.outputs.status == 'success' && needs.Kover.outputs.status == 'success'
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# uses: voxmedia/github-action-slack-notify-build@v1
# with:
# channel: ccc
# status: SUCCESS
# color: good
#
# - name: Notify slack fail
# if: false == (needs.GradleBuild.outputs.status == 'success') || false == (needs.XCodeBuild.outputs.status == 'success') || false == (needs.Kover.outputs.status == 'success')
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# uses: voxmedia/github-action-slack-notify-build@v1
# with:
# channel: ccc
# status: FAILED
# color: danger

0 comments on commit 889d098

Please sign in to comment.