Skip to content

Commit ab39af2

Browse files
authored
Fully migrate to GitHub Actions (#746)
1 parent 211a0d6 commit ab39af2

File tree

5 files changed

+39
-96
lines changed

5 files changed

+39
-96
lines changed

.github/workflows/dart.yml

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,134 @@
1-
# Created with package:mono_repo v3.1.0-beta.1
1+
# Created with package:mono_repo v3.1.0-beta.2
22
name: Dart CI
3-
43
on:
54
push:
6-
branches: [ master ]
5+
branches:
6+
- $default-branch
77
pull_request:
8-
8+
schedule:
9+
- cron: "0 0 * * 0"
910
defaults:
1011
run:
1112
shell: bash
13+
env:
14+
PUB_ENVIRONMENT: bot.github
1215

1316
jobs:
1417
job_001:
18+
name: mono_repo self validate
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: cedx/setup-dart@v2
22+
with:
23+
release-channel: stable
24+
version: latest
25+
- run: dart --version
26+
- uses: actions/checkout@v2
27+
- run: pub global activate mono_repo 3.1.0-beta.2
28+
- run: pub global run mono_repo generate --validate
29+
job_002:
1530
name: "OS: linux; SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; TASKS: [`dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings --fatal-infos .`]"
1631
runs-on: ubuntu-latest
1732
steps:
1833
- uses: cedx/setup-dart@v2
1934
with:
2035
release-channel: dev
36+
- run: dart --version
2137
- uses: actions/checkout@v2
2238
- env:
2339
PKGS: _test_yaml checked_yaml example json_annotation json_serializable
2440
TRAVIS_OS_NAME: linux
2541
run: tool/ci.sh dartfmt dartanalyzer_0
26-
job_002:
42+
job_003:
2743
name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; TASKS: `dartanalyzer --fatal-warnings .`"
2844
runs-on: ubuntu-latest
2945
steps:
3046
- uses: cedx/setup-dart@v2
3147
with:
3248
release-channel: stable
3349
version: "2.7.0"
50+
- run: dart --version
3451
- uses: actions/checkout@v2
3552
- env:
3653
PKGS: _test_yaml checked_yaml example json_annotation json_serializable
3754
TRAVIS_OS_NAME: linux
3855
run: tool/ci.sh dartanalyzer_1
39-
job_003:
56+
job_004:
4057
name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`"
4158
runs-on: ubuntu-latest
4259
steps:
4360
- uses: cedx/setup-dart@v2
4461
with:
4562
release-channel: stable
4663
version: "2.7.0"
64+
- run: dart --version
4765
- uses: actions/checkout@v2
4866
- env:
4967
PKGS: _test_yaml checked_yaml example json_serializable
5068
TRAVIS_OS_NAME: linux
5169
run: tool/ci.sh test_0
52-
job_004:
70+
job_005:
5371
name: "OS: linux; SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`"
5472
runs-on: ubuntu-latest
5573
steps:
5674
- uses: cedx/setup-dart@v2
5775
with:
5876
release-channel: dev
77+
- run: dart --version
5978
- uses: actions/checkout@v2
6079
- env:
6180
PKGS: _test_yaml checked_yaml example json_serializable
6281
TRAVIS_OS_NAME: linux
6382
run: tool/ci.sh test_0
64-
job_005:
83+
job_006:
6584
name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`"
6685
runs-on: ubuntu-latest
6786
steps:
6887
- uses: cedx/setup-dart@v2
6988
with:
7089
release-channel: stable
7190
version: "2.7.0"
91+
- run: dart --version
7292
- uses: actions/checkout@v2
7393
- env:
7494
PKGS: _test_yaml checked_yaml example json_serializable
7595
TRAVIS_OS_NAME: linux
7696
run: tool/ci.sh test_1
77-
job_006:
97+
job_007:
7898
name: "OS: linux; SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`"
7999
runs-on: ubuntu-latest
80100
steps:
81101
- uses: cedx/setup-dart@v2
82102
with:
83103
release-channel: dev
104+
- run: dart --version
84105
- uses: actions/checkout@v2
85106
- env:
86107
PKGS: _test_yaml checked_yaml example json_serializable
87108
TRAVIS_OS_NAME: linux
88109
run: tool/ci.sh test_1
89-
job_007:
110+
job_008:
90111
name: "OS: linux; SDK: 2.7.0; PKG: json_serializable; TASKS: `pub run test -p chrome`"
91112
runs-on: ubuntu-latest
92113
steps:
93114
- uses: cedx/setup-dart@v2
94115
with:
95116
release-channel: stable
96117
version: "2.7.0"
118+
- run: dart --version
97119
- uses: actions/checkout@v2
98120
- env:
99121
PKGS: json_serializable
100122
TRAVIS_OS_NAME: linux
101123
run: tool/ci.sh test_2
102-
job_008:
124+
job_009:
103125
name: "OS: linux; SDK: dev; PKG: json_serializable; TASKS: `pub run test -p chrome`"
104126
runs-on: ubuntu-latest
105127
steps:
106128
- uses: cedx/setup-dart@v2
107129
with:
108130
release-channel: dev
131+
- run: dart --version
109132
- uses: actions/checkout@v2
110133
- env:
111134
PKGS: json_serializable

.travis.yml

Lines changed: 0 additions & 74 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/google/json_serializable.dart.svg?branch=master)](https://travis-ci.org/google/json_serializable.dart)
1+
[![Dart CI](https://github.com/google/json_serializable.dart/workflows/Dart%20CI/badge.svg)](https://github.com/google/json_serializable.dart/actions?query=workflow%3A%22Dart+CI%22)
22

33
Provides [source_gen] `Generator`s to create code for JSON serialization and
44
deserialization.

mono_repo.yaml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
# See https://github.com/google/mono_repo.dart for details on this file
2-
self_validate: analyzer_and_format
2+
self_validate: true
33

4-
ci:
5-
- github
6-
- travis
7-
8-
travis:
9-
branches:
10-
only:
11-
- master
4+
github:
5+
cron: '0 0 * * 0' # “At 00:00 (UTC) on Sunday.”
126

137
merge_stages:
148
- analyzer_and_format

tool/ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Created with package:mono_repo v3.1.0-beta.1
2+
# Created with package:mono_repo v3.1.0-beta.2
33

44
# Support built in commands on windows out of the box.
55
function pub() {

0 commit comments

Comments
 (0)