Skip to content

Commit f1410ff

Browse files
authored
Fix invalid YAML in .travis.yml (#887)
This also adds a test to verify that all YAML files are valid. Travis won't run tests at all if its YAML is invalid, but this way Appveyor can warn about broken Travis config and vice versa, and a local test run will warn about either.
1 parent aac5999 commit f1410ff

File tree

2 files changed

+25
-5
lines changed

2 files changed

+25
-5
lines changed

.travis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,6 @@ jobs:
239239
- name: "GitHub: Windows"
240240
if: *deploy-if
241241
env: *github-env
242-
# GITHUB_AUTH="..."
243-
#
244-
# Note that this overrides the read-only auth token that's set for all
245-
# builds.
246-
- secure: "AAP74aT+8SQmwGeHrCsZ7GgppvCCkDAZXszivocMy3Fi9gfMCLABBCh67pGINJX4VlLW7ftPF3xivlvgGu+e4ncXz9m9jIPZ9Iza3cW5jCnCgyRGZD98gwabIDFWiv4X9V2xnJA2p1ZuYBf8Sh3TTipUFBKMjlnxVxYkIOTud4rUss/htFhxVA/oFTo0ThTZwXuxJ+GRGTM4PcuHPJvPf18iRPs2AHFV6ZP51xgc3AsXC6Zyom5EJeX0yGj9zWQ0XCjnuFdGsI6G9jmkrmqgAXuUipgqAn0tjxPYp9R/1HqnBLD3Zbrvyi5pCiSFclU6CS6kTDbefzPOc5+zrnlkaolVeF8tQ+EhZiZqtLnpLYUz9bgknoFUapUN4N0R36sKBStdRv54+sMeoOzpQ8ep3PeZW5nWbak12wcrDx38ToWs6hQ4ycb0SQDZZatHsASpSu2nX8HwzZSDAZmsAdB+epPmgA0CBjWVG1ycmVnT6l3OopUmbaY3pXBNzFUXq5Fcd7Q39/MfrmHpyxSc3QVf8xNtUx9ggYtK0Kwx6dgykhNMVzFGZRVyQgwpaiyDqgMGEU2GQzzcJhgKo9+y1fDtdfj/cctmvJ2Fo1fkk+DMkEPUHGOVo6uKFnartky9iLm1WiHDMruJ6SIOJzAnb+TMBWQTSwI+F4wyEiRVR8Zv4uA="
247242
script: skip
248243
deploy:
249244
provider: script

test/repo_test.dart

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2019 Google Inc. Use of this source code is governed by an
2+
// MIT-style license that can be found in the LICENSE file or at
3+
// https://opensource.org/licenses/MIT.
4+
5+
@TestOn('vm')
6+
7+
import 'dart:io';
8+
9+
import 'package:path/path.dart' as p;
10+
import 'package:test/test.dart';
11+
import 'package:yaml/yaml.dart';
12+
13+
void main() {
14+
group("YAML files are valid:", () {
15+
for (var entry in Directory.current.listSync()) {
16+
if (entry is File &&
17+
(entry.path.endsWith(".yaml") || entry.path.endsWith(".yml"))) {
18+
test(p.basename(entry.path), () {
19+
// Shouldn't throw an error.
20+
loadYaml(entry.readAsStringSync());
21+
});
22+
}
23+
}
24+
});
25+
}

0 commit comments

Comments
 (0)