-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SuperEditor][SuperTextLayout] Move golden runner to new package and …
- Loading branch information
1 parent
7c7ad2c
commit 0b5e7c3
Showing
34 changed files
with
917 additions
and
545 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,9 @@ | ||
*/example/ | ||
*/build/ | ||
*/.dart_tool/ | ||
|
||
# We dont need git history inside the image. | ||
.git | ||
|
||
# Ignore the golden failure directories because they will be mapped. | ||
**/failures/ |
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,30 @@ | ||
# Miscellaneous | ||
*.class | ||
*.log | ||
*.pyc | ||
*.swp | ||
.DS_Store | ||
.atom/ | ||
.buildlog/ | ||
.history | ||
.svn/ | ||
migrate_working_dir/ | ||
|
||
# IntelliJ related | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
|
||
# The .vscode folder contains launch configuration and tasks you configure in | ||
# VS Code which you may wish to be included in version control, so this line | ||
# is commented out by default. | ||
#.vscode/ | ||
|
||
# Flutter/Dart/Pub related | ||
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. | ||
/pubspec.lock | ||
**/doc/api/ | ||
.dart_tool/ | ||
.packages | ||
build/ |
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,10 @@ | ||
# This file tracks properties of this Flutter project. | ||
# Used by Flutter tool to assess capabilities and perform upgrades etc. | ||
# | ||
# This file should be version controlled and should not be manually edited. | ||
|
||
version: | ||
revision: "f8afcd5aa01b3ae6c55cb6e4c9fa4171e27a92f6" | ||
channel: "master" | ||
|
||
project_type: package |
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,3 @@ | ||
## 0.0.1 | ||
|
||
* TODO: Describe initial release. |
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 @@ | ||
TODO: Add your license here. |
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,41 @@ | ||
This package contains a tool to run golden tests and update golden files in a docker container. | ||
|
||
The command should be run from the root of the package being tested. | ||
|
||
## Activate the package: | ||
|
||
```console | ||
dart pub global activate --source path ./golden_runner | ||
``` | ||
|
||
## Run golden tests: | ||
|
||
``` | ||
# run all tests | ||
flutter pub run ../golden_runner/tool/goldens test | ||
# run a single test | ||
flutter pub run ../golden_runner/tool/goldens test --plain-name "something" | ||
# run all tests in a directory | ||
flutter pub run ../golden_runner/tool/goldens test test_goldens/my_dir | ||
# run a single test in a directory | ||
flutter pub run ../golden_runner/tool/goldens test --plain-name "something" test_goldens/my_dir | ||
``` | ||
|
||
## Update golden files: | ||
|
||
``` | ||
# update all goldens | ||
flutter pub run ../golden_runner/tool/goldens update | ||
# update all goldens in a directory | ||
flutter pub run ../golden_runner/tool/goldens update test_goldens/my_dir | ||
# update a single golden | ||
flutter pub run ../golden_runner/tool/goldens update --plain-name "something" | ||
# update a single golden in a directory | ||
flutter pub run ../golden_runner/tool/goldens update --plain-name "something" test_goldens/my_dir | ||
``` |
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,4 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
# Additional information about this file can be found at | ||
# https://dart.dev/guides/language/analysis-options |
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,17 @@ | ||
import 'dart:io'; | ||
|
||
// ignore: depend_on_referenced_packages | ||
import 'package:args/command_runner.dart'; | ||
import 'package:golden_runner/golden_runner.dart'; | ||
|
||
Future<void> main(List<String> arguments) async { | ||
final runner = CommandRunner("goldens", "A tool to run and update golden tests using docker") | ||
..addCommand(GoldenTestCommand()) | ||
..addCommand(UpdateGoldensCommand()); | ||
|
||
try { | ||
await runner.run(arguments); | ||
} on UsageException catch (e) { | ||
stdout.write(e); | ||
} | ||
} |
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,3 @@ | ||
library golden_runner; | ||
|
||
export 'src/commands.dart'; |
Oops, something went wrong.