-
Notifications
You must be signed in to change notification settings - Fork 1
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 #379 from COS301-SE-2024/development
🎆 Award Merge
- Loading branch information
Showing
134 changed files
with
6,984 additions
and
2,884 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,55 @@ | ||
# Add 'root' label to any root file changes | ||
# Quotation marks are required for the leading asterisk | ||
root: | ||
- changed-files: | ||
- any-glob-to-any-file: '*' | ||
|
||
# Add 'AnyChange' label to any changes within the entire repository | ||
AnyChange: | ||
- changed-files: | ||
- any-glob-to-any-file: '**' | ||
|
||
DevOps: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- '.github/*' | ||
# Add 'Documentation' label to any file changes within 'docs' or 'guides' folders | ||
Documentation: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- doc/* | ||
- '**/*.md' | ||
- head-branch: ['^doc', 'doc'] | ||
|
||
Dotnet: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- dotnet/* | ||
|
||
BirdApi: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- dotnet/BirdApi/* | ||
|
||
UserApi: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- dotnet/BirdApi/* | ||
|
||
flutter: | ||
- changed-files: | ||
- any-glob-to-any-file: | ||
- beakpeek/* | ||
|
||
# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name | ||
feature: | ||
- head-branch: ['^dev/feat', 'feat'] | ||
|
||
fix: | ||
- head-branch: ['^dev/fix', 'fix'] | ||
|
||
test: | ||
- head-branch: ['^dev/test', 'test'] | ||
|
||
release: | ||
- base-branch: 'main' |
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,62 @@ | ||
name: 📄 Generate coverage for both 🥅 dotnet and 🦚 Flutter | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- development | ||
- '**devops**' | ||
- '**test**' | ||
paths: | ||
- 'beakpeek/**' | ||
- 'dotnet/BirdApi' | ||
- '.github/workflows/coverage.yml' | ||
|
||
workflow_call: | ||
workflow_dispatch: | ||
|
||
# Don't forget that "!" is used to check if something is set | ||
|
||
jobs: | ||
flutter-coverage: | ||
name: 🦚 Flutter Coverage | ||
uses: ./.github/workflows/flutter.yml | ||
with: | ||
upload-coverage: true # this has to be true to not upload coverage | ||
secrets: inherit | ||
|
||
dotnet-coverage: | ||
name: 🥅 Dotnet Coverage | ||
uses: ./.github/workflows/dotnet.yml | ||
with: | ||
upload-coverage: true | ||
secrets: inherit | ||
|
||
upload-coverage: | ||
runs-on: ubuntu-latest | ||
name: 📔 Upload to codecov | ||
needs: [flutter-coverage, dotnet-coverage] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get Flutter Code Coverage | ||
uses: actions/download-artifact@v4 | ||
id: get-flutter-coverage | ||
with: | ||
name: flutter-code-coverage-${{hashFiles('beakpeek/pubspec.lock')}} | ||
|
||
- name: Get Dotnet Code Coverage | ||
uses: actions/download-artifact@v4 | ||
id: get-dotner-coverage | ||
with: | ||
name: dotnet-code-coverage-${{hashFiles('dotnet/BirdApi/BeakPeekApi/packages.lock.json', 'dotnet/BirdApi/BeakPeekApi.Tests/packages.lock.json')}} | ||
|
||
- name: Upload coverage | ||
# if: ${{ !env.ACT }} | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
files: ./lcov.info, ./coverage.cobertura.xml | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: true | ||
verbose: true | ||
name: BeakPeek Coverage |
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 |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: 📢 Publish Android release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
env: | ||
FLUTTER_CHANNEL: "stable" | ||
RUBY_VERSION: "3.2.2" | ||
|
||
jobs: | ||
test_android: | ||
name: 🧪 Test Flutter | ||
uses: ./.github/workflows/flutter.yml | ||
secrets: inherit | ||
|
||
build_android: | ||
name: 🏛️ Build Android | ||
needs: [test_android] | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./beakpeek | ||
timeout-minutes: 20 | ||
outputs: | ||
artifact_url: ${{ steps.artifact-upload-step.outputs.artifact-url}} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
if: ${{ env.ACT }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Setup Android SDK | ||
if: ${{ env.ACT }} | ||
uses: android-actions/setup-android@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
bundler-cache: true | ||
working-directory: './beakpeek/android' | ||
|
||
- name: Run Flutter tasks | ||
uses: subosito/[email protected] | ||
with: | ||
channel: stable | ||
cache: true | ||
pub-cache-key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }} | ||
|
||
- name: Create google_service_account.json | ||
run: | | ||
pwd | ||
echo "${{ secrets.FIREBASE_SERVICE_ACCOUNT_BASE64 }}" | base64 --decode > google_service_account.json | ||
- name: Create key.jks | ||
run: | | ||
pwd | ||
echo "${{ secrets.ANDROID_KEYSTORE_FILE_BASE64 }}" | base64 --decode > android/app/upload-keystore.jks | ||
- name: Create local.properties | ||
run: | | ||
pwd | ||
echo "${{ secrets.ANDROID_LOCAL_PROPERTIES_FILE_BASE64 }}" | base64 --decode > android/local.properties | ||
- name: Create key.properties | ||
run: | | ||
echo $PATH | ||
pwd | ||
cat <<EOF > android/key.properties | ||
storePassword=${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | ||
keyPassword=${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | ||
keyAlias=upload | ||
storeFile=\\\upload-keystore.jks | ||
EOF | ||
env: | ||
ANDROID_KEY_STORE_PASSWORD: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }} | ||
|
||
- name: Build and Release to Google Play | ||
uses: maierj/[email protected] | ||
with: | ||
lane: 'release_play_store' | ||
subdirectory: ./beakpeek/android | ||
options: '{ "version_number": "${{ github.ref_name }}" }' | ||
env: | ||
APP_PACKAGE_NAME: ${{ secrets.APP_PACKAGE_NAME }} | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v4 | ||
id: artifact-upload-step | ||
with: | ||
name: app-release | ||
path: beakpeek/build/app/outputs/bundle/release/app-release.aab | ||
|
||
notify_discord: | ||
name: 🔔 Send Discord notification about Build | ||
needs: [build_android] | ||
if: ${{ !cancelled() && (success() || failure()) }} | ||
uses: ./.github/workflows/discord.yml | ||
with: | ||
content: "${{ contains(needs.build_android.result, 'success') && 'Successfully released' || 'Error during release of' }} ${{ github.ref_name }} for Android to Play Store" | ||
title: "${{ contains(needs.build_android.result, 'success') && 'Successfully released' || 'Error during release of' }} ${{ github.ref_name }} for Android to Play Store" | ||
url: ${{ needs.build_android.outputs.artifact_url }} | ||
description: "${{ contains(needs.build_android.result, 'success') && 'Released:' || 'Release failed:' }} ${{ github.event.head_commit.message }}" | ||
color: ${{ contains(needs.build_android.result, 'success') && 65280 || 16711680 }} | ||
secrets: inherit | ||
|
Oops, something went wrong.