Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,18 @@ updates:
update-types:
- "minor"
- "patch"

- package-ecosystem: "gradle"
directory: "/transcriberapp/android"
schedule:
interval: "weekly"
day: "monday"
time: "06:00"
timezone: "UTC"
groups:
android-deps:
patterns:
- "*"
update-types:
- "minor"
- "patch"
28 changes: 16 additions & 12 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
## Description

- Summarize the changes and the intent.
- Explain the motivation and context.

## Type of change

- [ ] Bug fix
- [ ] Feature
- [ ] Refactor
- [ ] Chore/CI
- [ ] Documentation
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Refactor (code restructuring)
- [ ] Chore/CI (updating configurations, dependencies, etc.)
- [ ] Documentation update

## Testing
## Testing Checklist

- [ ] `flutter analyze` (or CI green)
- [ ] `dart format --set-exit-if-changed .`
- [ ] `flutter test`
- [ ] `flutter build apk --release`
- [ ] No breaking changes introduced
- [ ] `flutter analyze` passes locally
- [ ] `dart format --set-exit-if-changed .` passes locally
- [ ] `flutter test` passes locally
- [ ] New unit tests have been added to cover the changes (if applicable)
- [ ] `flutter build apk --release` succeeds locally without errors

## Screenshots (if UI changes)

If applicable, add screenshots or screen recordings.
| Before | After |
| ------ | ----- |
| [Screenshot] | [Screenshot] |

## Linked issue

Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build Android

on:
workflow_dispatch:
push:
branches:
- release/*

jobs:
build_android:
runs-on: ubuntu-latest
defaults:
run:
working-directory: transcriberapp

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('transcriberapp/android/**/*.gradle*', 'transcriberapp/android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Build APK
run: flutter build apk --release

- name: Build App Bundle
run: flutter build appbundle --release

- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: release-apk
path: transcriberapp/build/app/outputs/flutter-apk/app-release.apk

- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: release-aab
path: transcriberapp/build/app/outputs/bundle/release/app-release.aab
37 changes: 25 additions & 12 deletions .github/workflows/flutter_ci.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ name: Flutter CI

on:
push:
branches: [main]
branches:
- main
- develop
pull_request:
branches:
- main
- develop

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

jobs:
build:
build_and_test:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -22,27 +31,31 @@ jobs:
channel: stable

- name: Cache pub dependencies
uses: actions/cache@v5
uses: actions/cache@v4
with:
path: |
~/.pub-cache
~/.flutter-plugins
~/.flutter-plugin-cache
transcriberapp/.dart_tool
key: ${{ runner.os }}-pub-${{ hashFiles('transcriberapp/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pub-

- name: Install dependencies
run: flutter pub get

- name: Analyze
run: flutter analyze

- name: Check formatting
run: dart format --set-exit-if-changed .

- name: Run tests
run: flutter test
- name: Analyze
run: flutter analyze

- name: Build APK (release)
run: flutter build apk --release
- name: Run tests with coverage
run: flutter test --coverage

- name: Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: transcriberapp/coverage/lcov.info
# Currently set to 0 to avoid breaking CI since there are no tests yet.
# Change to 80 when ready.
min_coverage: 0
54 changes: 54 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '30 4 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java-kotlin' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Flutter build (for java-kotlin compilation)
run: |
cd transcriberapp
flutter pub get
flutter build apk --release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
11 changes: 11 additions & 0 deletions .github/workflows/commit-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Lint Commit Messages
on: [pull_request]

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6
21 changes: 21 additions & 0 deletions .github/workflows/dependency_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Dependency Review'
on:
pull_request:
branches: [ "main", "develop" ]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4

- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
with:
# Optional: Block PRs introducing dependencies with GPL/AGPL licenses
deny-licenses: GPL-1.0-or-later, GPL-2.0-or-later, GPL-3.0-or-later, AGPL-1.0-or-later, AGPL-3.0-or-later
fail-on-severity: high
45 changes: 45 additions & 0 deletions .github/workflows/dependency_staleness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Dependency Staleness Check

on:
schedule:
- cron: '0 5 * * 1' # Runs at 05:00 UTC on Mondays
workflow_dispatch:

jobs:
check-staleness:
runs-on: ubuntu-latest
defaults:
run:
working-directory: transcriberapp
permissions:
issues: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Check Outdated Packages
id: check_outdated
run: |
OUTDATED=$(flutter pub outdated)
echo "$OUTDATED"

# We can create a simple check. If there are resolvable updates, we might want to flag them.
# Here we just output it to a file for the next step.
echo "$OUTDATED" > outdated_report.txt

- name: Create Issue if highly outdated
uses: peter-evans/create-issue-from-file@v5
if: success()
with:
title: "Weekly Dependency Staleness Report"
content-filepath: transcriberapp/outdated_report.txt
labels: "dependencies, maintenance"
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
defaults:
run:
working-directory: transcriberapp

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Install dependencies
run: flutter pub get

- name: Build APK
run: flutter build apk --release

- name: Build App Bundle
run: flutter build appbundle --release

- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
transcriberapp/build/app/outputs/flutter-apk/app-release.apk
transcriberapp/build/app/outputs/bundle/release/app-release.aab
6 changes: 6 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# CODEOWNERS
# Use this file to require reviews from maintainers for specific directories or files.

* @MabelMoncy
/transcriberapp/ @MabelMoncy
/android/ @MabelMoncy
Loading
Loading