Skip to content

Commit 74e0b42

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 + Remove unnecessary dependency on dart_dev
1 parent 71fa588 commit 74e0b42

File tree

7 files changed

+120
-83
lines changed

7 files changed

+120
-83
lines changed

.github/workflows/dart_ci.yml

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
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+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
sdk: [ 2.7.2, stable, dev ]
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: dart-lang/[email protected]
22+
with:
23+
sdk: ${{ matrix.sdk }}
24+
25+
- name: Print Dart SDK version
26+
run: dart --version
27+
28+
- id: install
29+
name: Install dependencies
30+
run: pub get --no-precompile
31+
32+
- name: Validate dependencies
33+
run: pub run dependency_validator -i coverage,build_runner,build_test,build_web_compilers,meta,pedantic
34+
if: always() && steps.install.outcome == 'success'
35+
36+
- name: Analyze project source
37+
run: if [ ${{ matrix.sdk }} = '2.7.2' ]; then pub global activate tuneup && tuneup check --ignore-infos; else dart analyze; fi
38+
if: always() && steps.install.outcome == 'success'
39+
40+
test_ddc:
41+
runs-on: ubuntu-latest
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
sdk: [ 2.7.2, stable, dev ]
46+
steps:
47+
- uses: actions/checkout@v2
48+
- uses: dart-lang/[email protected]
49+
with:
50+
sdk: ${{ matrix.sdk }}
51+
52+
- name: Print Dart SDK version
53+
run: dart --version
54+
55+
- id: install
56+
name: Install dependencies
57+
run: pub get --no-precompile
58+
59+
- name: Run tests (DDC)
60+
run: pub run build_runner test -- --file-reporter json:reports/${{ matrix.sdk }}/ddc/test-results.json
61+
if: always() && steps.install.outcome == 'success'
62+
63+
- name: Upload Unit Test Results
64+
uses: actions/upload-artifact@v2
65+
if: ${{ steps.install.outcome == 'success' && (success() || failure()) }} # run this step even if previous step failed, but not if it was skipped
66+
with:
67+
name: ddc-test-results@${{ matrix.sdk }}
68+
path: reports/${{ matrix.sdk }}/ddc/test-results.json
69+
70+
- name: Report Unit Test Results
71+
uses: dorny/test-reporter@v1
72+
if: ${{ always() && steps.install.outcome == 'success' }}
73+
with:
74+
name: Unit Test Results (ddc - ${{ matrix.sdk }})
75+
path: 'reports/${{ matrix.sdk }}/ddc/test-results.json'
76+
reporter: dart-json
77+
78+
test_dart2js:
79+
runs-on: ubuntu-latest
80+
strategy:
81+
fail-fast: false
82+
matrix:
83+
sdk: [ 2.7.2, stable, dev ]
84+
steps:
85+
- uses: actions/checkout@v2
86+
- uses: dart-lang/[email protected]
87+
with:
88+
sdk: ${{ matrix.sdk }}
89+
90+
- name: Print Dart SDK version
91+
run: dart --version
92+
93+
- id: install
94+
name: Install dependencies
95+
run: pub get --no-precompile
96+
97+
- name: Run tests (dart2js)
98+
run: pub run build_runner test -r -- --file-reporter json:reports/${{ matrix.sdk }}/dart2js/test-results.json
99+
if: always() && steps.install.outcome == 'success'
100+
101+
- name: Upload Unit Test Results
102+
uses: actions/upload-artifact@v2
103+
if: ${{ steps.install.outcome == 'success' && (success() || failure()) }} # run this step even if previous step failed, but not if it was skipped
104+
with:
105+
name: dart2js-test-results@${{ matrix.sdk }}
106+
path: reports/${{ matrix.sdk }}/dart2js/test-results.json
107+
108+
- name: Report Unit Test Results
109+
uses: dorny/test-reporter@v1
110+
if: ${{ always() && steps.install.outcome == 'success' }}
111+
with:
112+
name: Unit Test Results (dart2js - ${{ matrix.sdk }})
113+
path: 'reports/${{ matrix.sdk }}/dart2js/test-results.json'
114+
reporter: dart-json

.travis.yml

-21
This file was deleted.

Dockerfile

-15
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,6 @@ ARG GIT_MERGE_BRANCH
1414
ARG GIT_SSH_KEY
1515
ARG KNOWN_HOSTS_CONTENT
1616

17-
# wget is used to install chrome
18-
RUN apt-get update && apt-get install -y \
19-
wget \
20-
&& rm -rf /var/lib/apt/lists/*
21-
22-
# install chrome
23-
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
24-
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list
25-
RUN apt-get -qq update && apt-get install -y google-chrome-stable
26-
RUN mv /usr/bin/google-chrome-stable /usr/bin/google-chrome
27-
RUN sed -i --follow-symlinks -e 's/\"\$HERE\/chrome\"/\"\$HERE\/chrome\" --no-sandbox/g' /usr/bin/google-chrome
28-
2917
# Install SSH keys for git ssh access
3018
RUN mkdir /root/.ssh
3119
RUN echo "$KNOWN_HOSTS_CONTENT" > "/root/.ssh/known_hosts"
@@ -37,7 +25,4 @@ WORKDIR /build/
3725
ADD . /build/
3826

3927
RUN pub get
40-
RUN pub run dart_dev analyze
41-
RUN pub run dependency_validator -i pedantic
42-
RUN pub run dart_dev test
4328
FROM scratch

README.md

+1-2
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.

dart_test.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
platforms:
2+
- chrome
3+
4+
paths:
5+
- test/over_react_test.dart

pubspec.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ dev_dependencies:
1616
build_runner: ^1.7.1
1717
build_test: ">=0.10.9 <2.0.0"
1818
build_web_compilers: ^2.5.1
19-
dart_dev: ^2.2.0
2019
dependency_validator: ^1.4.0
2120
pedantic: ^1.8.0

tool/dev.dart

-44
This file was deleted.

0 commit comments

Comments
 (0)