-
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 #5 from Rexios80/develop
Develop
- Loading branch information
Showing
33 changed files
with
980 additions
and
13 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,37 @@ | ||
name: Static Analysis | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
static-analysis: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- uses: subosito/flutter-action@v2 | ||
- name: Pub get | ||
run: flutter pub get | ||
- name: Format | ||
run: flutter format . --set-exit-if-changed | ||
- name: Analyze | ||
run: flutter analyze | ||
# - name: Embedme | ||
# run: | | ||
# npm install embedme | ||
# npx embedme README.md --verify | ||
# - name: Build runner | ||
# if: ${{ matrix.project == 'fast_rx_test' }} | ||
# run: | | ||
# flutter pub run build_runner build --delete-conflicting-outputs | ||
# git diff --exit-code | ||
- name: Activate fvm | ||
run: | | ||
dart pub global activate fvm | ||
fvm install stable | ||
- name: Test | ||
run: flutter test | ||
- name: Pana | ||
run: | | ||
flutter pub global activate pana | ||
pana --no-warning --exit-code-threshold 20 |
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 |
---|---|---|
@@ -1 +1,6 @@ | ||
include: package:rexios_lints/dart/package.yaml | ||
include: package:rexios_lints/dart/package.yaml | ||
|
||
analyzer: | ||
exclude: | ||
# workaround for https://github.com/dart-lang/sdk/issues/42910 | ||
- 'test_resources/**' |
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,25 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:yaml/yaml.dart'; | ||
|
||
class PubyConfig { | ||
final List<String> excludes; | ||
|
||
PubyConfig._({ | ||
required this.excludes, | ||
}); | ||
|
||
PubyConfig.empty() : this._(excludes: []); | ||
|
||
factory PubyConfig.fromProjectPath(String path) { | ||
final file = File('$path/puby.yaml'); | ||
if (!file.existsSync()) { | ||
return PubyConfig.empty(); | ||
} | ||
|
||
final yaml = loadYaml(file.readAsStringSync()); | ||
final excludes = (yaml['exclude'] as List?)?.cast<String>() ?? []; | ||
|
||
return PubyConfig._(excludes: excludes); | ||
} | ||
} |
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,37 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import 'test_utils.dart'; | ||
|
||
void main() { | ||
test('[engine] clean', () async { | ||
final result = await testCommand(['clean']); | ||
final stdout = result.stdout; | ||
|
||
expect(result.exitCode, 0); | ||
|
||
// dart | ||
// Default exclusion | ||
expectLine(stdout, ['dart_puby_test', 'Skip']); | ||
// Default exclusion | ||
expectLine( | ||
stdout, | ||
['dart_puby_test${Platform.pathSeparator}example', 'Skip'], | ||
); | ||
|
||
// flutter | ||
expectLine(stdout, ['flutter_puby_test', 'flutter clean']); | ||
expectLine(stdout, [ | ||
'flutter_puby_test${Platform.pathSeparator}example', | ||
'flutter clean', | ||
]); | ||
|
||
// fvm | ||
expectLine(stdout, ['fvm_puby_test', 'fvm flutter clean']); | ||
expectLine(stdout, [ | ||
'fvm_puby_test${Platform.pathSeparator}example', | ||
'fvm flutter clean', | ||
]); | ||
}); | ||
} |
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,48 @@ | ||
import 'dart:io'; | ||
|
||
import 'package:test/test.dart'; | ||
|
||
import 'test_utils.dart'; | ||
|
||
void main() { | ||
test('[engine] gen', () async { | ||
final result = await testCommand(['gen']); | ||
final stdout = result.stdout; | ||
|
||
// Since these projects have no code generation, the command should fail | ||
expect(result.exitCode, isNot(0)); | ||
|
||
// dart | ||
expectLine(stdout, [ | ||
'dart_puby_test', | ||
'dart pub run build_runner build --delete-conflicting-outputs', | ||
]); | ||
// Explicit exclusion | ||
expectLine( | ||
stdout, | ||
['dart_puby_test${Platform.pathSeparator}example', 'Skip'], | ||
); | ||
|
||
// flutter | ||
expectLine(stdout, [ | ||
'flutter_puby_test', | ||
'flutter pub run build_runner build --delete-conflicting-outputs', | ||
]); | ||
// Explicit exclusion | ||
expectLine( | ||
stdout, | ||
['flutter_puby_test${Platform.pathSeparator}example', 'Skip'], | ||
); | ||
|
||
// fvm | ||
expectLine(stdout, [ | ||
'fvm_puby_test', | ||
'fvm flutter pub run build_runner build --delete-conflicting-outputs', | ||
]); | ||
// Explicit exclusion | ||
expectLine( | ||
stdout, | ||
['fvm_puby_test${Platform.pathSeparator}example', 'Skip'], | ||
); | ||
}); | ||
} |
Oops, something went wrong.