Skip to content

Commit

Permalink
Merge c7366ca into b0e092e
Browse files Browse the repository at this point in the history
  • Loading branch information
alann-maulana committed Apr 27, 2021
2 parents b0e092e + c7366ca commit 8252568
Show file tree
Hide file tree
Showing 23 changed files with 360 additions and 161 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/coverage-report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Coverage Coverage Report

on:
push:
branches:
master
pull_request:
branches:
master

jobs:
codecov_io:
name: "Codecov.io"
runs-on: ubuntu-latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.0.5'
channel: 'stable'
- name: Generate coverage report
run: flutter test --coverage --coverage-path ./coverage/lcov.info
- name: Send to codecov.io
run: bash <(curl -s https://codecov.io/bash)
- run: ls -al ./coverage
- name: "Upload coverage"
uses: actions/upload-artifact@v1
with:
name: coverage
path: ./coverage

coveralls_io:
name: "Coveralls.io"
needs: codecov_io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: "Download coverage"
uses: actions/download-artifact@v1
with:
name: coverage
path: ./coverage
- name: "Setup ruby"
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'
- run: gem install coveralls-lcov
- run: cat ./coverage/lcov.info
- name: Send to coveralls.io
run: coveralls-lcov --repo-token $COVERALLS_TOKEN coverage/lcov.info
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/flutter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Flutter CI

on:
push:
branches:
master
pull_request:
branches:
master

jobs:
build:
name: Build & Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.0.5'
channel: 'stable'
- run: flutter packages get
- run: flutter format --set-exit-if-changed .
- run: flutter analyze .
- run: flutter test
35 changes: 35 additions & 0 deletions .github/workflows/pub-publish-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pub Publish Test

on:
push:
branches:
master
pull_request:
branches:
master

jobs:
build:
name: Publishing Test (Dry Run)
runs-on: ubuntu-latest
env:
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.0.5'
channel: 'stable'
- name: Documenting package
run: |
echo "FLUTTER_ROOT=$FLUTTER_HOME" >> $GITHUB_ENV
bash scripts/credentials.sh
rm -rf scripts/
make
make deps
pub global activate dartdoc
make docs
pub publish -n -v
32 changes: 32 additions & 0 deletions .github/workflows/pub-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Pub Publish

on:
push:
tags:
- '*'

jobs:
build:
name: Publishing
runs-on: ubuntu-latest
env:
PUB_CREDENTIALS: ${{ secrets.PUB_CREDENTIALS }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.0.5'
channel: 'stable'
- name: Documenting package
run: |
echo "FLUTTER_ROOT=$FLUTTER_HOME" >> $GITHUB_ENV
bash scripts/credentials.sh
rm -rf scripts/
make
make deps
pub global activate dartdoc
make docs
pub publish -f -v
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pana:

docs:
rm -rf doc
dartdoc --exclude 'dart:async,dart:collection,dart:convert,dart:core,dart:developer,dart:io,dart:isolate,dart:math,dart:typed_data,dart:ui,dart:html_common,dart:ffi,dart:html,dart:js,dart:js_util'
pub global run dartdoc --exclude 'dart:async,dart:collection,dart:convert,dart:core,dart:developer,dart:io,dart:isolate,dart:math,dart:typed_data,dart:ui,dart:html_common,dart:ffi,dart:html,dart:js,dart:js_util' --ignore 'ambiguous-doc-reference' --sdk-dir '${FLUTTER_ROOT}/bin/cache/dart-sdk'

publish:
pub publish
39 changes: 20 additions & 19 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -56,7 +56,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -80,21 +80,21 @@ packages:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -106,55 +106,56 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
sdks:
dart: ">=2.10.0-110 <2.11.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.12.13+hotfix.5"
1 change: 1 addition & 0 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: example
description: A new Flutter project.
publish_to: 'none'

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
Expand Down
8 changes: 8 additions & 0 deletions lib/scripts/credentials.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

if [[ ! -e ~/.pub-cache/credentials.json ]]; then
mkdir -p ~/.pub-cache
touch ~/.pub-cache/credentials.json
fi

echo $PUB_CREDENTIALS > ~/.pub-cache/credentials.json
8 changes: 5 additions & 3 deletions lib/src/helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_hud/flutter_hud.dart';

Widget showOrUpdateProgressIndicator(HUD hud, double value) {
Widget showOrUpdateProgressIndicator(HUD hud, double? value) {
if (value == null) {
return hud.progressIndicator;
}

if (hud.progressIndicator is CircularProgressIndicator) {
CircularProgressIndicator old = hud.progressIndicator;
CircularProgressIndicator old =
hud.progressIndicator as CircularProgressIndicator;
return CircularProgressIndicator(
key: old.key,
value: value,
Expand All @@ -21,7 +22,8 @@ Widget showOrUpdateProgressIndicator(HUD hud, double value) {
}

if (hud.progressIndicator is LinearProgressIndicator) {
LinearProgressIndicator old = hud.progressIndicator;
LinearProgressIndicator old =
hud.progressIndicator as LinearProgressIndicator;
return LinearProgressIndicator(
key: old.key,
value: value,
Expand Down
Loading

0 comments on commit 8252568

Please sign in to comment.