Skip to content

Commit b956fa3

Browse files
authored
Add Github Actions workflow (#2464)
* Add Github Actions workflow * Use bash for all run steps * Bypass travis.sh on windows * Configure git to emulate appveyor * Remove the coverage token on windows * Remove caches * Use native coveralls action * Remove travis coveralls integration * Print coveralls result
1 parent 03821e3 commit b956fa3

File tree

7 files changed

+79
-105
lines changed

7 files changed

+79
-105
lines changed

.github/workflows/test.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Test
2+
3+
on:
4+
# Run CI on pushes to the main branch, and on PRs against main.
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
schedule:
10+
- cron: 0 15 * * *
11+
12+
env:
13+
PUB_ENVIRONMENT: bot.github
14+
15+
jobs:
16+
test:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [ubuntu-latest]
22+
sdk: [dev, stable]
23+
job: [main, sdk-analyzer, flutter, packages, sdk-docs]
24+
include:
25+
- os: macos-latest
26+
sdk: dev
27+
job: main
28+
- os: windows-latest
29+
sdk: dev
30+
job: main
31+
exclude:
32+
# Do not try to run flutter against the "stable" sdk,
33+
# it is unlikely to work and produces uninteresting
34+
# results.
35+
- sdk: stable
36+
job: flutter
37+
- sdk: stable
38+
job: sdk-analyzer
39+
40+
steps:
41+
- name: Configure git
42+
if: runner.os == 'Windows'
43+
run: git config --global core.autocrlf input
44+
- uses: actions/checkout@v2
45+
- uses: dart-lang/[email protected]
46+
with:
47+
channel: ${{ matrix.sdk }}
48+
- name: Install dependencies
49+
run: dart pub get
50+
- name: ${{ matrix.job }}
51+
if: runner.os != 'Windows'
52+
run: ./tool/travis.sh
53+
env:
54+
DARTDOC_BOT: ${{ matrix.job }}
55+
COVERAGE_TOKEN: true # this needs to be set to enable coverage
56+
- name: ${{ matrix.job }}
57+
if: runner.os == 'Windows' && matrix.job == 'main'
58+
run: pub run grinder buildbot
59+
env:
60+
DARTDOC_BOT: ${{ matrix.job }}
61+
- id: coverage
62+
name: Upload coverage
63+
if: runner.os == 'Linux' && matrix.job == 'main' && matrix.sdk == 'dev'
64+
uses: coverallsapp/[email protected]
65+
with:
66+
github-token: ${{ secrets.GITHUB_TOKEN }}
67+
path-to-lcov: lcov.info
68+
- name: Echo coveralls api result
69+
if: runner.os == 'Linux' && matrix.job == 'main' && matrix.sdk == 'dev'
70+
run: echo ${{ steps.coverage.outputs['coveralls-api-result'] }}

.travis.yml

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

CONTRIBUTING.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ If you want to contribute, check out the [issue tracker][] and see if there's an
1616
issue that you're passionate about. If you want to add a new feature that's not
1717
yet in the issue tracker, start by opening an issue. Thanks!
1818

19-
[![Build Status](https://travis-ci.org/dart-lang/dartdoc.svg)](https://travis-ci.org/dart-lang/dartdoc)
20-
[![Build status](https://ci.appveyor.com/api/projects/status/s6sh69et2ga00dlu?svg=true)](https://ci.appveyor.com/project/devoncarew/dartdoc)
19+
[![Build Status](https://github.com/dart-lang/dartdoc/workflows/Test/badge.svg)](https://github.com/dart-lang/dartdoc/actions?query=workflow%3ATest)
2120

2221
## Making Changes
2322

@@ -32,7 +31,7 @@ yet in the issue tracker, start by opening an issue. Thanks!
3231
## Testing
3332

3433
dartdoc has a number of grinder utility methods that can be used to check for behavior changes
35-
or try out your change on arbitrary packages.
34+
or try out your change on arbitrary packages.
3635

3736
```bash
3837
# Serve the latest version of the given package locally on port 9000.

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# dartdoc
22

3-
[![Build Status](https://travis-ci.org/dart-lang/dartdoc.svg?branch=master)](https://travis-ci.org/dart-lang/dartdoc)
4-
[![Appveyor Build Status](https://ci.appveyor.com/api/projects/status/s6sh69et2ga00dlu?svg=true)](https://ci.appveyor.com/project/devoncarew/dartdoc)
3+
[![Build Status](https://github.com/dart-lang/dartdoc/workflows/Test/badge.svg)](https://github.com/dart-lang/dartdoc/actions?query=workflow%3ATest)
54
[![Coverage Status](https://coveralls.io/repos/github/dart-lang/dartdoc/badge.svg?branch=master)](https://coveralls.io/github/dart-lang/dartdoc?branch=master)
65

76

@@ -93,13 +92,13 @@ authoring doc comments for Dart with `dartdoc`.
9392
### dartdoc_options.yaml
9493

9594
Creating a file named dartdoc_options.yaml at the top of your package can change how Dartdoc
96-
generates docs.
95+
generates docs.
9796

9897
An example (not necessarily recommended settings):
9998

10099
```yaml
101100
dartdoc:
102-
categories:
101+
categories:
103102
"First Category":
104103
markdown: doc/First.md
105104
name: Awesome
@@ -171,7 +170,7 @@ Unrecognized options will be ignored. Supported options:
171170
* **uriTemplate**: A template to substitute revision and file path information. If revision
172171
is present in the template but not specified, or if root is not specified, dartdoc will
173172
throw an exception. To hard-code a revision, don't specify it with `%r%`.
174-
173+
175174
The following strings will be substituted in to complete the URL:
176175
* `%f%`: Relative path of file to the repository root
177176
* `%r%`: Revision
@@ -200,7 +199,7 @@ dartdoc_options.yaml**, as above.
200199

201200
```dart
202201
/// Here is my library.
203-
///
202+
///
204203
/// {@category Amazing}
205204
library my_library;
206205
```
@@ -325,7 +324,7 @@ The `macos`, `linux`, and `windows` tags are used to describe the commands to be
325324
run on each of those platforms, and the `setup_macos`, `setup_linux`, and
326325
`setup_windows` tags define setup commands for their respective platforms.
327326

328-
The `description` is just a short description of the tool for use as help text.
327+
The `description` is just a short description of the tool for use as help text.
329328

330329
Only tools which are configured in the `dartdoc_options.yaml` file are able to
331330
be invoked.
@@ -473,7 +472,7 @@ Some examples of likely triage priorities:
473472
* Minor display warts not significantly impeding navigation, not widespread
474473
* Generation problems that should be detected but aren't warned, not
475474
widespread
476-
* Default-on warnings that are misleading or wrong, few or on edge cases
475+
* Default-on warnings that are misleading or wrong, few or on edge cases
477476
* Non-default warnings that are misleading or wrong, widespread
478477
* Enhancements considered important but without significant data indicating
479478
they are a big win

appveyor.yml

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

tool/install_travis.sh

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

tool/travis.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,4 @@ elif [ "$DARTDOC_BOT" = "sdk-analyzer" ]; then
4545
else
4646
echo "Running main dartdoc bot"
4747
pub run grinder buildbot
48-
if [ -n "$COVERAGE_TOKEN" ] ; then
49-
coveralls-lcov --repo-token="${COVERAGE_TOKEN}" lcov.info
50-
fi
5148
fi

0 commit comments

Comments
 (0)