Skip to content

Commit 8265831

Browse files
authored
add github actions for all non-ui packages (#172)
I also had to skip many sets of tests for now just due to missing dependencies and such, I filed #173 to follow up on these. But, some testing is better than no testing for now.
1 parent 327dc87 commit 8265831

22 files changed

+316
-50
lines changed

.github/workflows/appengine.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: package:appengine
2+
permissions: read-all
3+
4+
on:
5+
# Run CI on all PRs (against any branch) and on pushes to the main branch.
6+
pull_request:
7+
paths:
8+
- '.github/workflows/appengine.yaml'
9+
- 'appengine/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/appengine.yaml'
14+
- 'appengine/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
defaults:
19+
run:
20+
working-directory: appengine
21+
22+
jobs:
23+
build:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
sdk:
29+
- 2.19.6
30+
os:
31+
- ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
35+
with:
36+
sdk: ${{ matrix.sdk }}
37+
38+
- run: dart pub get
39+
40+
- run: dart analyze --fatal-infos
41+
42+
- run: dart format --output=none --set-exit-if-changed .
43+
44+
# TODO: Tests should use `dart test`
45+
# TODO: How to run this test?
46+
# - run: dart test/create_source_test.dart
47+
- run: dart test/test_source_test.dart

.github/workflows/baseline.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: package:baseline
2+
permissions: read-all
3+
4+
on:
5+
# Run CI on all PRs (against any branch) and on pushes to the main branch.
6+
pull_request:
7+
paths:
8+
- '.github/workflows/baseline.yaml'
9+
- 'baseline/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/baseline.yaml'
14+
- 'baseline/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
defaults:
19+
run:
20+
working-directory: baseline
21+
22+
jobs:
23+
build:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
sdk:
29+
- 2.19.6
30+
os:
31+
- ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
35+
with:
36+
sdk: ${{ matrix.sdk }}
37+
38+
- run: dart pub get
39+
40+
- run: dart analyze --fatal-infos
41+
42+
- run: dart format --output=none --set-exit-if-changed .
43+
44+
# TODO: Install gsutil and un-skip tests that require it
45+
- run: dart test -x requires_gsutil

.github/workflows/builder.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: package:builder
2+
permissions: read-all
3+
4+
on:
5+
# Run CI on all PRs (against any branch) and on pushes to the main branch.
6+
pull_request:
7+
paths:
8+
- '.github/workflows/builder.yaml'
9+
- 'builder/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/builder.yaml'
14+
- 'builder/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
defaults:
19+
run:
20+
working-directory: builder
21+
22+
jobs:
23+
build:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
sdk:
29+
- 3.1.0
30+
os:
31+
- ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
35+
with:
36+
sdk: ${{ matrix.sdk }}
37+
38+
- run: dart pub get
39+
40+
- run: dart analyze --fatal-infos
41+
42+
- run: dart format --output=none --set-exit-if-changed .
43+
44+
# Skip the tests that require auth, at least for now.
45+
- run: dart test -x requires_auth
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: package:current_results
2+
permissions: read-all
3+
4+
on:
5+
# Run CI on all PRs (against any branch) and on pushes to the main branch.
6+
pull_request:
7+
paths:
8+
- '.github/workflows/current_results.yaml'
9+
- 'current_results/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/current_results.yaml'
14+
- 'current_results/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
defaults:
19+
run:
20+
working-directory: current_results
21+
22+
jobs:
23+
build:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
sdk:
29+
- 3.7.0 # min pubspec SDK
30+
- stable
31+
os:
32+
- ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
35+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
39+
- run: dart pub get
40+
41+
# TODO: Enable once we get proto generation working
42+
# - run: dart analyze --fatal-infos
43+
44+
- run: dart format --output=none --set-exit-if-changed .
45+
if: ${{ matrix.sdk == 'stable' }}
46+
47+
# TODO: Enable once we get proto generation working
48+
# - run: dart test

.github/workflows/functions.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: package:functions
2+
permissions: read-all
3+
4+
on:
5+
# Run CI on all PRs (against any branch) and on pushes to the main branch.
6+
pull_request:
7+
paths:
8+
- '.github/workflows/functions.yaml'
9+
- 'github-label-notifier/functions/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/functions.yaml'
14+
- 'github-label-notifier/functions/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
defaults:
19+
run:
20+
working-directory: github-label-notifier/functions
21+
22+
jobs:
23+
build:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
sdk:
29+
- 2.19.0 # min pubspec SDK
30+
- stable
31+
os:
32+
- ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
35+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
39+
- run: dart pub get
40+
41+
- run: dart analyze --fatal-infos
42+
43+
- run: dart format --output=none --set-exit-if-changed .
44+
if: ${{ matrix.sdk == 'stable' }}
45+
46+
# TODO: Get these running, need to install firebase
47+
# - run: test.sh

.github/workflows/symbolizer.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: package:symbolizer
2+
permissions: read-all
3+
4+
on:
5+
# Run CI on all PRs (against any branch) and on pushes to the main branch.
6+
pull_request:
7+
paths:
8+
- '.github/workflows/symbolizer.yaml'
9+
- 'github-label-notifier/symbolizer/**'
10+
push:
11+
branches: [ main ]
12+
paths:
13+
- '.github/workflows/symbolizer.yaml'
14+
- 'github-label-notifier/symbolizer/**'
15+
schedule:
16+
- cron: '0 0 * * 0' # weekly
17+
18+
defaults:
19+
run:
20+
working-directory: github-label-notifier/symbolizer
21+
22+
jobs:
23+
build:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
sdk:
29+
- 3.3.0 # min pubspec SDK
30+
- stable
31+
os:
32+
- ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
35+
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
36+
with:
37+
sdk: ${{ matrix.sdk }}
38+
39+
- run: dart pub get
40+
41+
- run: dart analyze --fatal-infos
42+
43+
- run: dart format --output=none --set-exit-if-changed .
44+
if: ${{ matrix.sdk == 'stable' }}
45+
46+
# TODO: Get these running, needs some LLVM related tools installed
47+
# - run: dart test

baseline/dart_test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tags:
2+
requires_gsutil: {}

baseline/test/baseline_test.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ main() {
7676
'--dry-run',
7777
'--ignore-unmapped',
7878
], testData);
79-
});
79+
}, tags: ['requires_gsutil']);
8080

8181
test('baseline ignored config mapping', () async {
8282
final newBuilderStableResults = [
@@ -101,7 +101,7 @@ main() {
101101
newBuilderStableResults,
102102
...testData,
103103
});
104-
});
104+
}, tags: ['requires_gsutil']);
105105

106106
test('baseline default config mapping', () async {
107107
final newBuilderDevResults = [
@@ -145,7 +145,7 @@ main() {
145145
'configuration/dev/config3/0/results.json': [newBuilderDevResults[2]],
146146
'configuration/dev/config4/0/results.json': [newBuilderDevResults[3]],
147147
});
148-
});
148+
}, tags: ['requires_gsutil']);
149149

150150
test('baseline dry-run', () async {
151151
await baselineTest([
@@ -156,7 +156,7 @@ main() {
156156
'config3:new-config3,config4:new-config4',
157157
'--dry-run',
158158
], testData);
159-
});
159+
}, tags: ['requires_gsutil']);
160160

161161
test('baseline', () async {
162162
final newBuilderStableResults = [
@@ -202,7 +202,7 @@ main() {
202202
],
203203
...testData,
204204
});
205-
});
205+
}, tags: ['requires_gsutil']);
206206

207207
test('baseline with suite filter', () async {
208208
final newBuilderStableResults = [
@@ -236,7 +236,7 @@ main() {
236236
],
237237
...testData,
238238
});
239-
});
239+
}, tags: ['requires_gsutil']);
240240

241241
test('baseline merge configs', () async {
242242
final newBuilderStableResults = [
@@ -268,7 +268,7 @@ main() {
268268
newBuilderStableResults,
269269
...testData,
270270
});
271-
});
271+
}, tags: ['requires_gsutil']);
272272

273273
test('baseline split configs', () async {
274274
final newBuilderStableResults = [
@@ -301,7 +301,7 @@ main() {
301301
],
302302
...testData,
303303
});
304-
});
304+
}, tags: ['requires_gsutil']);
305305
}
306306

307307
Future<void> baselineTest(

baseline/test/options_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ main() {
7979
ConfigurationMapping.strict('foo', {
8080
'foo': ['bar']
8181
}),
82-
'bar');
82+
['bar']);
8383
expect(
8484
() => ConfigurationMapping.strict('oof', {
8585
'foo': ['bar']
@@ -92,7 +92,7 @@ main() {
9292
ConfigurationMapping.relaxed('foo', {
9393
'foo': ['bar']
9494
}),
95-
'bar');
95+
['bar']);
9696
expect(
9797
ConfigurationMapping.relaxed('oof', {
9898
'foo': ['bar']
@@ -105,11 +105,11 @@ main() {
105105
ConfigurationMapping.none('foo', {
106106
'foo': ['bar']
107107
}),
108-
'foo');
108+
['foo']);
109109
expect(
110110
ConfigurationMapping.none('oof', {
111111
'foo': ['bar']
112112
}),
113-
'oof');
113+
['oof']);
114114
});
115115
}

builder/dart_test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tags:
2+
requires_auth: {}

0 commit comments

Comments
 (0)