Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Mono Repo Using Melos #327

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
5e327e9
chore: Setup Melos monorepo configuration and update dependencies
ProjectAJ14 Jan 30, 2025
c7e9312
chore: Consolidate deployment and testing scripts into Melos configur…
ProjectAJ14 Jan 30, 2025
22ba45f
chore: Add GitHub Actions workflows for Talker packages
ProjectAJ14 Jan 30, 2025
836b017
chore: Update GitHub Actions workflow for code coverage and testing
ProjectAJ14 Jan 30, 2025
ab6f672
Merge pull request #1 from ProjectAJ14/git_workflow
ProjectAJ14 Jan 30, 2025
88022d4
chore: Update GitHub Actions workflow branch configuration
ProjectAJ14 Jan 30, 2025
03f32c7
chore: Expand GitHub Actions workflow package testing matrix
ProjectAJ14 Jan 30, 2025
58853ff
chore: Add test coverage step to GitHub Actions workflow
ProjectAJ14 Jan 30, 2025
2d6515b
feat(talker_http_logger): Add settings tests for hidden headers confi…
ProjectAJ14 Jan 30, 2025
83bad3a
refactor: formatted talker_http_logger_example.dart
ProjectAJ14 Jan 30, 2025
051891f
chore: Add GitHub Pages deployment workflow for shop app example
ProjectAJ14 Jan 30, 2025
6b4b787
chore: Optimize GitHub Pages deployment workflow
ProjectAJ14 Jan 30, 2025
55c14d8
chore: Update GitHub Pages workflow to build shop app example
ProjectAJ14 Jan 30, 2025
c3d2652
chore: Add pub dependencies cache to GitHub Pages workflow for shop a…
ProjectAJ14 Jan 30, 2025
4b53459
chore: Cleanup GitHub Actions workflows
ProjectAJ14 Jan 30, 2025
c4726af
chore: Consolidate analysis_options.yaml configuration
ProjectAJ14 Jan 30, 2025
dcac5e3
refactor: Modernize Dart code with null safety and constructor syntax
ProjectAJ14 Jan 30, 2025
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
81 changes: 81 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Dart

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# All the packages are specified by their name and not path.
# This is because the package is passed to the 'melos exec' command
package:
- talker
- talker_bloc_logger
- talker_dio_logger
- talker_flutter
- talker_http_logger
- talker_logger
- talker_riverpod_logger
include:
- package: talker
path: packages
test: true
- package: talker_bloc_logger
path: packages
test: true
- package: talker_dio_logger
path: packages
test: true
- package: talker_flutter
path: packages
test: false
- package: talker_http_logger
path: packages
test: true
- package: talker_logger
path: packages
test: true
- package: talker_riverpod_logger
path: packages
test: true

steps:
- uses: actions/checkout@v3

- uses: subosito/flutter-action@v2
- name: Install dependencies
run: |
dart pub global activate melos
dart pub get
dart run melos bs

- name: Format package
run: melos exec --scope="${{ matrix.package }}" -- dart format . --set-exit-if-changed

- name: Analyze package
run: melos exec --scope="${{ matrix.package }}" -- dart analyze --fatal-infos

- name: Run tests
if: matrix.test
run: melos exec --scope="${{ matrix.package }}" -- flutter test --coverage

- name: Check Code Coverage
if: matrix.test
uses: VeryGoodOpenSource/very_good_coverage@v3.0.0
with:
path: ${{ matrix.path }}/${{ matrix.package }}/coverage/lcov.info
min_coverage: 90

- name: Upload coverage reports to Codecov
if: matrix.test
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.package }}
files: ${{ matrix.path }}/${{ matrix.package }}/coverage/lcov.info

39 changes: 39 additions & 0 deletions .github/workflows/host_on_github_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Host on GitHub Pages
on:
push:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Flutter
uses: subosito/flutter-action@v2
- run: flutter --version

- name: Cache pub dependencies
uses: actions/cache@v2
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-

- name: Install dependencies
run: |
dart pub global activate melos
dart pub get
dart run melos bs --scope="*shop_app_example*"

- name: Build web
run: |
cd examples/shop_app_example
flutter build web

- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: examples/shop_app_example/build/web
64 changes: 0 additions & 64 deletions .github/workflows/talker.yaml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/talker_bloc_logger.yaml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/talker_dio_logger.yaml

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/talker_flutter.yaml

This file was deleted.

Loading