-
Notifications
You must be signed in to change notification settings - Fork 4
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 #6 from PlugFox/feature/null_safety
Feature/null safety
- Loading branch information
Showing
13 changed files
with
270 additions
and
296 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 |
---|---|---|
@@ -1,31 +1,33 @@ | ||
name: platform_info | ||
|
||
on: | ||
push: | ||
branches: [ master, dev ] | ||
branches: [ master, dev, feature/null_safety ] | ||
pull_request: | ||
branches: [ master, dev ] | ||
branches: [ master, dev, feature/null_safety ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: google/dart:latest | ||
image: google/dart:2.12-dev | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
- name: Install Dependencies | ||
run: pub get | ||
- name: Format | ||
run: dartfmt --dry-run --set-exit-if-changed lib | ||
- name: Run analyzer | ||
run: dartanalyzer --fatal-infos --fatal-warnings lib example test | ||
run: dart pub get | ||
- name: Check format | ||
run: dart format --set-exit-if-changed none | ||
- name: Check analyzer | ||
run: dart analyze --fatal-infos --fatal-warnings . | ||
- name: Run tests | ||
run: pub run test_coverage | ||
run: dart test --coverage=coverage && dart run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.packages --report-on=lib | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Check Code Coverage | ||
uses: ChicagoFlutter/lcov-cop@v1.0.2 | ||
uses: VeryGoodOpenSource/very_good_coverage@v1.1.1 | ||
with: | ||
path: coverage/lcov.info | ||
min_coverage: 100 | ||
exclude: "**/*.g.dart" |
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
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
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,28 @@ | ||
import 'package:meta/meta.dart' show immutable, literal; | ||
|
||
import 'base_host_platform.dart' show HostPlatform; | ||
import 'enums.dart'; | ||
|
||
/// Unknown host platform with default values | ||
@immutable | ||
class DefaultHostPlatform implements HostPlatform { | ||
/// Unknown host platform with default values | ||
@literal | ||
const DefaultHostPlatform(); | ||
|
||
@override | ||
HostPlatformType get type => | ||
identical(0, 0.0) ? HostPlatformType.web : HostPlatformType.io; | ||
|
||
@override | ||
OperatingSystem get operatingSystem => OperatingSystem.unknown; | ||
|
||
@override | ||
String get version => '<unknown>'; | ||
|
||
@override | ||
String get locale => 'en'; | ||
|
||
@override | ||
int get numberOfProcessors => 0; | ||
} |
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
Oops, something went wrong.