Skip to content

Commit 29c9ec0

Browse files
Switch to github CI
+ And start building on stable instead of 2.8.4 since dart-lang/sdk#42977 has been resolved by the over_react builder
1 parent 71fa588 commit 29c9ec0

File tree

3 files changed

+133
-23
lines changed

3 files changed

+133
-23
lines changed

.github/workflows/dart_ci.yml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: Dart CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
- 'test_consume_*'
8+
pull_request:
9+
branches:
10+
- '*'
11+
12+
jobs:
13+
validate:
14+
env:
15+
PUB_CACHE: /home/runner/.pub-cache
16+
runs-on: ubuntu-latest
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
sdk: [ 2.7.2, stable, dev ]
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: dart-lang/[email protected]
24+
with:
25+
sdk: ${{ matrix.sdk }}
26+
27+
- name: Print Dart SDK version
28+
run: dart --version
29+
30+
- uses: actions/cache@v2
31+
id: pub-cache # use this to check for `cache-hit` (`steps.pub-cache.outputs.cache-hit != 'true'`)
32+
with:
33+
path: ${{ env.PUB_CACHE }}
34+
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
35+
restore-keys: ${{ runner.os }}-pub-
36+
37+
- uses: actions/cache@v2
38+
id: dart-tool-cache # use this to check for `cache-hit` (`steps.dart-tool-cache.outputs.cache-hit != 'true'`)
39+
with:
40+
path: .dart_tool
41+
key: ${{ runner.os }}-dart_tool-${{ hashFiles('**/package_config.json') }}
42+
restore-keys: ${{ runner.os }}-dart_tool-
43+
44+
- id: install
45+
name: Install dependencies
46+
run: pub get
47+
48+
- name: Validate dependencies
49+
run: pub run dependency_validator -i coverage,build_runner,build_test,build_web_compilers,meta,pedantic
50+
if: always() && steps.install.outcome == 'success'
51+
52+
- name: Analyze project source
53+
run: if [ ${{ matrix.sdk }} = '2.7.2' ]; then pub global activate tuneup && tuneup check; else pub run dart_dev analyze; fi
54+
if: always() && steps.install.outcome == 'success'
55+
56+
test_ddc:
57+
env:
58+
PUB_CACHE: /home/runner/.pub-cache
59+
runs-on: ubuntu-latest
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
sdk: [ 2.7.2, stable, dev ]
64+
steps:
65+
- uses: actions/checkout@v2
66+
- uses: dart-lang/[email protected]
67+
with:
68+
sdk: ${{ matrix.sdk }}
69+
70+
- name: Print Dart SDK version
71+
run: dart --version
72+
73+
- uses: actions/cache@v2
74+
id: pub-cache # use this to check for `cache-hit` (`steps.pub-cache.outputs.cache-hit != 'true'`)
75+
with:
76+
path: ${{ env.PUB_CACHE }}
77+
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
78+
restore-keys: ${{ runner.os }}-pub-
79+
80+
- uses: actions/cache@v2
81+
id: dart-tool-cache # use this to check for `cache-hit` (`steps.dart-tool-cache.outputs.cache-hit != 'true'`)
82+
with:
83+
path: .dart_tool
84+
key: ${{ runner.os }}-dart_tool-${{ hashFiles('**/package_config.json') }}
85+
restore-keys: ${{ runner.os }}-dart_tool-
86+
87+
- id: install
88+
name: Install dependencies
89+
run: pub get
90+
91+
- name: Run tests (DDC)
92+
run: pub run dart_dev test -P dartdevc
93+
if: always() && steps.install.outcome == 'success'
94+
95+
test_dart2js:
96+
env:
97+
PUB_CACHE: /home/runner/.pub-cache
98+
runs-on: ubuntu-latest
99+
strategy:
100+
fail-fast: false
101+
matrix:
102+
sdk: [ 2.7.2, stable, dev ]
103+
steps:
104+
- uses: actions/checkout@v2
105+
- uses: dart-lang/[email protected]
106+
with:
107+
sdk: ${{ matrix.sdk }}
108+
109+
- name: Print Dart SDK version
110+
run: dart --version
111+
112+
- uses: actions/cache@v2
113+
id: pub-cache # use this to check for `cache-hit` (`steps.pub-cache.outputs.cache-hit != 'true'`)
114+
with:
115+
path: ${{ env.PUB_CACHE }}
116+
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
117+
restore-keys: ${{ runner.os }}-pub-
118+
119+
- uses: actions/cache@v2
120+
id: dart-tool-cache # use this to check for `cache-hit` (`steps.dart-tool-cache.outputs.cache-hit != 'true'`)
121+
with:
122+
path: .dart_tool
123+
key: ${{ runner.os }}-dart_tool-${{ hashFiles('**/package_config.json') }}
124+
restore-keys: ${{ runner.os }}-dart_tool-
125+
126+
- id: install
127+
name: Install dependencies
128+
run: pub get
129+
130+
- name: Run tests (dart2js)
131+
run: pub run dart_dev test --build-args="-r" -P dart2js
132+
if: always() && steps.install.outcome == 'success'

.travis.yml

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

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# OverReact Test
22

33
[![Pub](https://img.shields.io/pub/v/over_react_test.svg)](https://pub.dartlang.org/packages/over_react_test)
4-
[![Build Status](https://travis-ci.org/Workiva/over_react_test.svg?branch=master)](https://travis-ci.org/Workiva/over_react_test)
5-
[![Test Coverage](https://codecov.io/github/Workiva/over_react_test/coverage.svg?branch=master)](https://codecov.io/github/Workiva/over_react_test?branch=master)
4+
[![Build Status](https://github.com/Workiva/over_react_test/workflows/Dart%20CI/badge.svg?branch=master)](https://github.com/Workiva/over_react_test/actions?query=workflow%3A%22Dart+CI%22+branch%3Amaster)
65
[![Documentation](https://img.shields.io/badge/Documentation-over_react_test-blue.svg)](http://www.dartdocs.org/documentation/over_react_test/latest/)
76

87
> A library for testing [OverReact][over-react] components.

0 commit comments

Comments
 (0)