Skip to content

Commit 211a0d6

Browse files
authored
Enable github actions (#743)
1 parent cbba355 commit 211a0d6

File tree

4 files changed

+129
-11
lines changed

4 files changed

+129
-11
lines changed

.github/workflows/dart.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Created with package:mono_repo v3.1.0-beta.1
2+
name: Dart CI
3+
4+
on:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
9+
defaults:
10+
run:
11+
shell: bash
12+
13+
jobs:
14+
job_001:
15+
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 .`]"
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: cedx/setup-dart@v2
19+
with:
20+
release-channel: dev
21+
- uses: actions/checkout@v2
22+
- env:
23+
PKGS: _test_yaml checked_yaml example json_annotation json_serializable
24+
TRAVIS_OS_NAME: linux
25+
run: tool/ci.sh dartfmt dartanalyzer_0
26+
job_002:
27+
name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; TASKS: `dartanalyzer --fatal-warnings .`"
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: cedx/setup-dart@v2
31+
with:
32+
release-channel: stable
33+
version: "2.7.0"
34+
- uses: actions/checkout@v2
35+
- env:
36+
PKGS: _test_yaml checked_yaml example json_annotation json_serializable
37+
TRAVIS_OS_NAME: linux
38+
run: tool/ci.sh dartanalyzer_1
39+
job_003:
40+
name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`"
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: cedx/setup-dart@v2
44+
with:
45+
release-channel: stable
46+
version: "2.7.0"
47+
- uses: actions/checkout@v2
48+
- env:
49+
PKGS: _test_yaml checked_yaml example json_serializable
50+
TRAVIS_OS_NAME: linux
51+
run: tool/ci.sh test_0
52+
job_004:
53+
name: "OS: linux; SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`"
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: cedx/setup-dart@v2
57+
with:
58+
release-channel: dev
59+
- uses: actions/checkout@v2
60+
- env:
61+
PKGS: _test_yaml checked_yaml example json_serializable
62+
TRAVIS_OS_NAME: linux
63+
run: tool/ci.sh test_0
64+
job_005:
65+
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`"
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: cedx/setup-dart@v2
69+
with:
70+
release-channel: stable
71+
version: "2.7.0"
72+
- uses: actions/checkout@v2
73+
- env:
74+
PKGS: _test_yaml checked_yaml example json_serializable
75+
TRAVIS_OS_NAME: linux
76+
run: tool/ci.sh test_1
77+
job_006:
78+
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`"
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: cedx/setup-dart@v2
82+
with:
83+
release-channel: dev
84+
- uses: actions/checkout@v2
85+
- env:
86+
PKGS: _test_yaml checked_yaml example json_serializable
87+
TRAVIS_OS_NAME: linux
88+
run: tool/ci.sh test_1
89+
job_007:
90+
name: "OS: linux; SDK: 2.7.0; PKG: json_serializable; TASKS: `pub run test -p chrome`"
91+
runs-on: ubuntu-latest
92+
steps:
93+
- uses: cedx/setup-dart@v2
94+
with:
95+
release-channel: stable
96+
version: "2.7.0"
97+
- uses: actions/checkout@v2
98+
- env:
99+
PKGS: json_serializable
100+
TRAVIS_OS_NAME: linux
101+
run: tool/ci.sh test_2
102+
job_008:
103+
name: "OS: linux; SDK: dev; PKG: json_serializable; TASKS: `pub run test -p chrome`"
104+
runs-on: ubuntu-latest
105+
steps:
106+
- uses: cedx/setup-dart@v2
107+
with:
108+
release-channel: dev
109+
- uses: actions/checkout@v2
110+
- env:
111+
PKGS: json_serializable
112+
TRAVIS_OS_NAME: linux
113+
run: tool/ci.sh test_2

.travis.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Created with package:mono_repo v3.0.0
1+
# Created with package:mono_repo v3.1.0-beta.1
22
language: dart
33

44
# Custom configuration
@@ -11,55 +11,55 @@ jobs:
1111
- stage: analyzer_and_format
1212
name: mono_repo self validate
1313
os: linux
14-
script: "pub global activate mono_repo 3.0.0 && pub global run mono_repo travis --validate"
14+
script: "pub global activate mono_repo 3.1.0-beta.1 && pub global run mono_repo generate --validate"
1515
- stage: analyzer_and_format
1616
name: "SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; TASKS: `dartanalyzer --fatal-warnings .`"
1717
dart: "2.7.0"
1818
os: linux
1919
env: PKGS="_test_yaml checked_yaml example json_annotation json_serializable"
20-
script: tool/travis.sh dartanalyzer_1
20+
script: tool/ci.sh dartanalyzer_1
2121
- stage: analyzer_and_format
2222
name: "SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; TASKS: [`dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings --fatal-infos .`]"
2323
dart: dev
2424
os: linux
2525
env: PKGS="_test_yaml checked_yaml example json_annotation json_serializable"
26-
script: tool/travis.sh dartfmt dartanalyzer_0
26+
script: tool/ci.sh dartfmt dartanalyzer_0
2727
- stage: unit_test
2828
name: "SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`"
2929
dart: "2.7.0"
3030
os: linux
3131
env: PKGS="_test_yaml checked_yaml example json_serializable"
32-
script: tool/travis.sh test_0
32+
script: tool/ci.sh test_0
3333
- stage: unit_test
3434
name: "SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`"
3535
dart: dev
3636
os: linux
3737
env: PKGS="_test_yaml checked_yaml example json_serializable"
38-
script: tool/travis.sh test_0
38+
script: tool/ci.sh test_0
3939
- stage: unit_test
4040
name: "SDK: 2.7.0; PKG: json_serializable; TASKS: `pub run test -p chrome`"
4141
dart: "2.7.0"
4242
os: linux
4343
env: PKGS="json_serializable"
44-
script: tool/travis.sh test_2
44+
script: tool/ci.sh test_2
4545
- stage: unit_test
4646
name: "SDK: dev; PKG: json_serializable; TASKS: `pub run test -p chrome`"
4747
dart: dev
4848
os: linux
4949
env: PKGS="json_serializable"
50-
script: tool/travis.sh test_2
50+
script: tool/ci.sh test_2
5151
- stage: ensure_build
5252
name: "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`"
5353
dart: "2.7.0"
5454
os: linux
5555
env: PKGS="_test_yaml checked_yaml example json_serializable"
56-
script: tool/travis.sh test_1
56+
script: tool/ci.sh test_1
5757
- stage: ensure_build
5858
name: "SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`"
5959
dart: dev
6060
os: linux
6161
env: PKGS="_test_yaml checked_yaml example json_serializable"
62-
script: tool/travis.sh test_1
62+
script: tool/ci.sh test_1
6363

6464
stages:
6565
- analyzer_and_format

mono_repo.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# See https://github.com/google/mono_repo.dart for details on this file
22
self_validate: analyzer_and_format
3+
4+
ci:
5+
- github
6+
- travis
7+
38
travis:
49
branches:
510
only:

tool/travis.sh renamed to 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.0.0
2+
# Created with package:mono_repo v3.1.0-beta.1
33

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

0 commit comments

Comments
 (0)