Skip to content

Commit 9186936

Browse files
committed
add a CI; rev version in prep for publishing
1 parent d361581 commit 9186936

File tree

10 files changed

+92
-29
lines changed

10 files changed

+92
-29
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Dependabot configuration file.
2+
version: 2
3+
4+
updates:
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "monthly"
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Build
2+
3+
on:
4+
schedule:
5+
# “At 00:00 (UTC) on Sunday.”
6+
- cron: '0 0 * * 0'
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
18+
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
19+
20+
- name: Install dependencies
21+
run: dart pub get
22+
23+
# Disabled - this would format ~492 files.
24+
# - name: Verify formatting
25+
# run: dart format --output=none --set-exit-if-changed .
26+
27+
- name: Analyze project source
28+
run: dart analyze --fatal-infos
29+
30+
- name: Run tests
31+
run: dart test

pkgs/appengine/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## 0.13.3-dev
1+
## 0.13.3
2+
3+
* Populate the pubspec `repository` field.
4+
* Update the readme to add experimental verbiage.
25

36
## 0.13.2
47
* Gracefully handle cases where logging fails.

pkgs/appengine/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
# Dart support for Google AppEngine
1+
[![Build Status](https://github.com/dart-lang/appengine/workflows/Dart/badge.svg)](https://github.com/dart-lang/appengine/actions)
2+
[![pub package](https://img.shields.io/pub/v/appengine.svg)](https://pub.dev/packages/appengine)
3+
[![package publisher](https://img.shields.io/pub/publisher/appengine.svg)](https://pub.dev/packages/appengine/publisher)
4+
5+
## Dart support for Google AppEngine
26

37
This package provides support for running server applications written in Dart on
48
[Google App Engine](https://cloud.google.com/appengine/) using

pkgs/appengine/analysis_options.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
include: package:pedantic/analysis_options.1.8.0.yaml
2+
3+
analyzer:
4+
errors:
5+
# This is triggered in generated code.
6+
unnecessary_import: ignore

pkgs/appengine/lib/src/server/logging_package_adaptor.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void setupAppEngineLogging() {
3737
if (level != null) {
3838
var message = record.message;
3939

40-
if (record.loggerName != null && record.loggerName.isNotEmpty) {
40+
if (record.loggerName.isNotEmpty) {
4141
message = '${record.loggerName}: $message';
4242
}
4343

pkgs/appengine/pubspec.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: appengine
2-
version: 0.13.3-dev
3-
description: >-
4-
Support for using Dart as a custom runtime on
5-
Google App Engine Flexible Environment
2+
version: 0.13.3
3+
description: >
4+
Support for using Dart as a custom runtime on Google App Engine Flexible
5+
Environment
66
repository: https://github.com/dart-lang/appengine
77

88
environment:
@@ -20,5 +20,5 @@ dependencies:
2020
stack_trace: ^1.10.0
2121

2222
dev_dependencies:
23-
test: ^1.17.5
2423
pedantic: ^1.11.0
24+
test: ^1.17.5

pkgs/appengine/test/integration/db/metamodel_tests.dart

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,46 @@ runTests(datastore, db.DatastoreDB store, String uniquePostfix) {
5656

5757
expect(namespaces.length, greaterThanOrEqualTo(3));
5858
expect(namespaces, contains(cond((dynamic ns) => ns.name == null)));
59-
expect(namespaces, contains(cond((dynamic ns) => ns.name == 'FooNamespace')));
60-
expect(namespaces, contains(cond((dynamic ns) => ns.name == 'BarNamespace')));
59+
expect(namespaces,
60+
contains(cond((dynamic ns) => ns.name == 'FooNamespace')));
61+
expect(namespaces,
62+
contains(cond((dynamic ns) => ns.name == 'BarNamespace')));
6163

6264
try {
6365
for (final namespace in [null, 'FooNamespace', 'BarNamespace']) {
64-
final partition = store.newPartition(namespace!);
66+
// TODO: Partition.newPartition should be updated to accept null.
67+
final partition = store.newPartition(namespace ?? '');
6568
final kindQuery = store.query<Kind>(partition: partition);
6669
final List<Kind> kinds = await kindQuery.run().cast<Kind>().toList();
6770

6871
expect(kinds.length, greaterThanOrEqualTo(2));
6972
if (namespace == null) {
70-
expect(kinds,
71-
contains(cond((dynamic k) => k.name == 'NullKind$uniquePostfix')));
72-
expect(kinds,
73-
contains(cond((dynamic k) => k.name == 'NullKind2$uniquePostfix')));
73+
expect(
74+
kinds,
75+
contains(
76+
cond((dynamic k) => k.name == 'NullKind$uniquePostfix')));
77+
expect(
78+
kinds,
79+
contains(
80+
cond((dynamic k) => k.name == 'NullKind2$uniquePostfix')));
7481
} else if (namespace == 'FooNamespace') {
75-
expect(kinds,
76-
contains(cond((dynamic k) => k.name == 'FooKind$uniquePostfix')));
77-
expect(kinds,
78-
contains(cond((dynamic k) => k.name == 'FooKind2$uniquePostfix')));
82+
expect(
83+
kinds,
84+
contains(
85+
cond((dynamic k) => k.name == 'FooKind$uniquePostfix')));
86+
expect(
87+
kinds,
88+
contains(
89+
cond((dynamic k) => k.name == 'FooKind2$uniquePostfix')));
7990
} else if (namespace == 'BarNamespace') {
80-
expect(kinds,
81-
contains(cond((dynamic k) => k.name == 'BarKind$uniquePostfix')));
82-
expect(kinds,
83-
contains(cond((dynamic k) => k.name == 'BarKind2$uniquePostfix')));
91+
expect(
92+
kinds,
93+
contains(
94+
cond((dynamic k) => k.name == 'BarKind$uniquePostfix')));
95+
expect(
96+
kinds,
97+
contains(
98+
cond((dynamic k) => k.name == 'BarKind2$uniquePostfix')));
8499
}
85100
}
86101
} finally {

pkgs/appengine/test/integration/grpc_datastore_test.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44

55
import 'dart:io';
66

7-
import 'package:test/test.dart' as test;
8-
9-
import 'package:grpc/grpc.dart' as grpc;
107
import 'package:appengine/src/grpc_api_impl/datastore_impl.dart';
118
import 'package:gcloud/db.dart' as db;
9+
import 'package:grpc/grpc.dart' as grpc;
10+
import 'package:test/test.dart' as test;
1211

1312
import 'common_e2e.dart' show withAuthenticator;
14-
import 'db/db_tests.dart' as db_tests;
15-
import 'db/metamodel_tests.dart' as metamodel_tests;
1613
import 'raw_datastore_test_impl.dart' as datastore_tests;
1714

1815
main() async {
@@ -24,6 +21,7 @@ main() async {
2421
(String project, grpc.HttpBasedAuthenticator authenticator) async {
2522
final clientChannel = grpc.ClientChannel(endpoint);
2623
final datastore = GrpcDatastoreImpl(clientChannel, authenticator, project);
24+
// ignore: unused_local_variable
2725
final dbService = db.DatastoreDB(datastore);
2826

2927
// Once all tests are done we'll close the resources.

pkgs/appengine/test/integration/raw_datastore_test_impl.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ runTests(Datastore datastore, String namespace) {
113113
if (key.elements.isEmpty) return false;
114114

115115
for (var element in key.elements) {
116-
if (element.kind is! String) return false;
117116
if (!ignoreIds) {
118117
if (element.id == null ||
119118
(element.id is! String && element.id is! int)) {

0 commit comments

Comments
 (0)