Skip to content

Commit

Permalink
Switch to github CI
Browse files Browse the repository at this point in the history
+ And start building on stable instead of 2.8.4 since dart-lang/sdk#42977 has been resolved by the over_react builder
  • Loading branch information
aaronlademann-wf committed Jul 23, 2021
1 parent 71fa588 commit 29c9ec0
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 23 deletions.
132 changes: 132 additions & 0 deletions .github/workflows/dart_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Dart CI

on:
push:
branches:
- 'master'
- 'test_consume_*'
pull_request:
branches:
- '*'

jobs:
validate:
env:
PUB_CACHE: /home/runner/.pub-cache
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ 2.7.2, stable, dev ]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}

- name: Print Dart SDK version
run: dart --version

- uses: actions/cache@v2
id: pub-cache # use this to check for `cache-hit` (`steps.pub-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-

- uses: actions/cache@v2
id: dart-tool-cache # use this to check for `cache-hit` (`steps.dart-tool-cache.outputs.cache-hit != 'true'`)
with:
path: .dart_tool
key: ${{ runner.os }}-dart_tool-${{ hashFiles('**/package_config.json') }}
restore-keys: ${{ runner.os }}-dart_tool-

- id: install
name: Install dependencies
run: pub get

- name: Validate dependencies
run: pub run dependency_validator -i coverage,build_runner,build_test,build_web_compilers,meta,pedantic
if: always() && steps.install.outcome == 'success'

- name: Analyze project source
run: if [ ${{ matrix.sdk }} = '2.7.2' ]; then pub global activate tuneup && tuneup check; else pub run dart_dev analyze; fi
if: always() && steps.install.outcome == 'success'

test_ddc:
env:
PUB_CACHE: /home/runner/.pub-cache
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ 2.7.2, stable, dev ]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}

- name: Print Dart SDK version
run: dart --version

- uses: actions/cache@v2
id: pub-cache # use this to check for `cache-hit` (`steps.pub-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-

- uses: actions/cache@v2
id: dart-tool-cache # use this to check for `cache-hit` (`steps.dart-tool-cache.outputs.cache-hit != 'true'`)
with:
path: .dart_tool
key: ${{ runner.os }}-dart_tool-${{ hashFiles('**/package_config.json') }}
restore-keys: ${{ runner.os }}-dart_tool-

- id: install
name: Install dependencies
run: pub get

- name: Run tests (DDC)
run: pub run dart_dev test -P dartdevc
if: always() && steps.install.outcome == 'success'

test_dart2js:
env:
PUB_CACHE: /home/runner/.pub-cache
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ 2.7.2, stable, dev ]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}

- name: Print Dart SDK version
run: dart --version

- uses: actions/cache@v2
id: pub-cache # use this to check for `cache-hit` (`steps.pub-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ env.PUB_CACHE }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-

- uses: actions/cache@v2
id: dart-tool-cache # use this to check for `cache-hit` (`steps.dart-tool-cache.outputs.cache-hit != 'true'`)
with:
path: .dart_tool
key: ${{ runner.os }}-dart_tool-${{ hashFiles('**/package_config.json') }}
restore-keys: ${{ runner.os }}-dart_tool-

- id: install
name: Install dependencies
run: pub get

- name: Run tests (dart2js)
run: pub run dart_dev test --build-args="-r" -P dart2js
if: always() && steps.install.outcome == 'success'
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# OverReact Test

[![Pub](https://img.shields.io/pub/v/over_react_test.svg)](https://pub.dartlang.org/packages/over_react_test)
[![Build Status](https://travis-ci.org/Workiva/over_react_test.svg?branch=master)](https://travis-ci.org/Workiva/over_react_test)
[![Test Coverage](https://codecov.io/github/Workiva/over_react_test/coverage.svg?branch=master)](https://codecov.io/github/Workiva/over_react_test?branch=master)
[![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)
[![Documentation](https://img.shields.io/badge/Documentation-over_react_test-blue.svg)](http://www.dartdocs.org/documentation/over_react_test/latest/)

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

0 comments on commit 29c9ec0

Please sign in to comment.