Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop travis #333

Merged
merged 1 commit into from
Jun 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Created with package:mono_repo v4.2.0-dev
# Created with package:mono_repo v5.0.0-dev
name: Dart CI
on:
push:
Expand Down
115 changes: 0 additions & 115 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion mono_repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
merge_stages:
- smoke_test

travis:
github:
# Setting just `cron` keeps the defaults for `push` and `pull_request`
cron: '0 0 * * 0' # “At 00:00 (UTC) on Sunday.”
Expand Down
3 changes: 2 additions & 1 deletion mono_repo/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 4.2.0-dev
## 5.0.0-dev

- *BREAKING* Drop support for Travis-CI.
- Change calls from `pub` to `dart pub` within generated scripts.

## 4.1.0
Expand Down
15 changes: 1 addition & 14 deletions mono_repo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ Available commands:
generate Generates the CI configuration for child packages.
presubmit Run the CI presubmits locally.
pub Runs the `pub` command with the provided arguments across all packages.
travis (Deprecated, use `generate`) Configure Travis-CI for child packages.

Run "mono_repo help <command>" for more information about a command.
```
Expand All @@ -50,8 +49,7 @@ To start, you should create a `mono_repo.yaml` file at the root of your repo.
This controls repo wide configuration.

One option you likely want to configure is which CI providers you want to
generate config for. Today both `travis` and `github` are supported, and
can be configured by adding corresponding entries.
generate config for. `github` can be configured by adding a corresponding entry.

You probably also want to enable the `self_validate` option, which will add a
job to ensure that your configuration is up to date.
Expand Down Expand Up @@ -123,17 +121,6 @@ github:
# Only run this stage for scheduled cron jobs
if: github.event_name == 'schedule'

# Enables Travis-CI - https://docs.travis-ci.com/
# If you have no configuration, you can set the value to `true` or just leave it
# empty.
travis:
# Specify any additional top-level configuration you want in your
# `.travis.yml` file.
# See https://config.travis-ci.com/ for more details
# Example:
after_failure:
- tool/report_failure.sh

# Adds a job that runs `mono_repo generate --validate` to check that everything
# is up to date. You can specify the value as just `true` or give a `stage`
# you'd like this job to run in.
Expand Down
18 changes: 3 additions & 15 deletions mono_repo/lib/src/ci_test_script.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import 'user_exception.dart';

String _dartCommandContent(String commandName) => '''
function $commandName() {
if [[ \$TRAVIS_OS_NAME == "windows" ]]; then
command $commandName.bat "\$@"
else
command $commandName "\$@"
fi
command $commandName "\$@"
}''';

String _dartCommandContentPub(String commandName) => '''
Expand All @@ -22,17 +18,9 @@ String _dartCommandContentPub(String commandName) => '''
# This assumes that the Flutter SDK has been installed in a previous step.
function $commandName() {
if grep -Fq "sdk: flutter" "\${PWD}/pubspec.yaml"; then
if [[ \$TRAVIS_OS_NAME == "windows" ]]; then
command flutter.bat pub "\$@"
else
command flutter pub "\$@"
fi
command flutter pub "\$@"
else
if [[ \$TRAVIS_OS_NAME == "windows" ]]; then
command pub.bat "\$@"
else
command dart pub "\$@"
fi
command dart pub "\$@"
fi
}''';

Expand Down
20 changes: 1 addition & 19 deletions mono_repo/lib/src/commands/generate.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
// BSD-style license that can be found in the LICENSE file.

import '../ci_shared.dart';
import '../mono_config.dart';
import '../root_config.dart';
import 'ci_script/generate.dart';
import 'github/generate.dart';
import 'mono_repo_command.dart';
import 'travis/generate.dart';

class GenerateCommand extends MonoRepoCommand {
@override
Expand All @@ -34,27 +32,11 @@ class GenerateCommand extends MonoRepoCommand {
void generate(
RootConfig config,
bool validateOnly, {
bool forceTravis = false,
bool forceGitHub = false,
}) {
logPackages(config);
validateRootConfig(config);
for (var ci in config.monoConfig.ci) {
switch (ci) {
case CI.github:
generateGitHubActions(config, validateOnly: validateOnly);
break;
case CI.travis:
generateTravisConfig(config, validateOnly: validateOnly);
break;
}
}
if (!config.monoConfig.ci.contains(CI.travis) && forceTravis) {
generateTravisConfig(config, validateOnly: validateOnly);
}
if (!config.monoConfig.ci.contains(CI.github) && forceGitHub) {
generateGitHubActions(config, validateOnly: validateOnly);
}
generateGitHubActions(config, validateOnly: validateOnly);
// Generate in all cases, since this is used by `presumbit`
generateCIScript(config, validateOnly: validateOnly);
}
67 changes: 0 additions & 67 deletions mono_repo/lib/src/commands/travis.dart

This file was deleted.

76 changes: 0 additions & 76 deletions mono_repo/lib/src/commands/travis/generate.dart

This file was deleted.

Loading