Skip to content

Commit 5ad714c

Browse files
authored
👷 Migrate to GitHub Actions from Travis CI
- Replace Travis CI with GitHub Actions - Add code coverage reporting to CodeCov
1 parent 1409ef6 commit 5ad714c

File tree

4 files changed

+72
-14
lines changed

4 files changed

+72
-14
lines changed

.github/workflows/dart.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Dart CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
- release-*
9+
pull_request:
10+
branches:
11+
- master
12+
- develop
13+
- release-*
14+
15+
jobs:
16+
test:
17+
name: Unit tests
18+
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
dart_sdk: [ 2.12.0, stable ]
22+
23+
steps:
24+
- name: Install Dart
25+
uses: dart-lang/setup-dart@v1
26+
with:
27+
sdk: ${{ matrix.dart_sdk }}
28+
- name: Checkout
29+
uses: actions/checkout@v2
30+
- name: Install dependencies
31+
run: pub get
32+
- name: Run tests
33+
run: xvfb-run -a pub run test -p vm,chrome --coverage .coverage
34+
- name: Format test coverage as LCOV
35+
run: pub run coverage:format_coverage --lcov --packages=.packages --report-on lib --in .coverage/ --out .coverage/lcov.info
36+
- name: Upload to CodeCov
37+
uses: codecov/codecov-action@v1
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
file: ./.coverage/lcov.info
41+
42+
43+
analyse:
44+
name: Code analysis
45+
runs-on: ubuntu-latest
46+
47+
container:
48+
image: google/dart:latest
49+
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v2
53+
- name: Install dependencies
54+
run: pub get
55+
- name: Run analyser
56+
run: dartanalyzer lib test example
57+
58+
format:
59+
name: Code format
60+
runs-on: ubuntu-latest
61+
62+
container:
63+
image: google/dart:latest
64+
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@v2
68+
- name: Check code format
69+
run: dartfmt -n --set-exit-if-changed .

.travis.yml

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

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# public_suffix
22
[![pub package](https://img.shields.io/pub/v/public_suffix.svg)](https://pub.dev/packages/public_suffix)
3-
[![Build Status](https://travis-ci.com/Komposten/public_suffix.svg?branch=master)](https://travis-ci.com/Komposten/public_suffix)
3+
[![Dart CI](https://github.com/Komposten/public_suffix/actions/workflows/dart.yaml/badge.svg)](https://github.com/Komposten/public_suffix/actions/workflows/dart.yaml)
4+
[![codecov](https://codecov.io/gh/Komposten/public_suffix/branch/master/graph/badge.svg)](https://codecov.io/gh/Komposten/public_suffix)
45

56
**A domain parser based on the [Public Suffix List](https://publicsuffix.org/)**
67

pubspec.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ dependencies:
1414
dev_dependencies:
1515
pedantic: ^1.11.0
1616
test: ^1.16.8
17+
coverage: ^1.0.2

0 commit comments

Comments
 (0)