Use new setup actions (#153)
diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml
index e958231..6d84019 100644
--- a/.github/workflows/test-package.yml
+++ b/.github/workflows/test-package.yml
@@ -1,4 +1,4 @@
-name: Dart CI
+name: CI
on:
# Run on PRs and pushes to the default branch.
@@ -14,23 +14,17 @@
jobs:
# Check code formatting and static analysis on a single OS (linux)
- # against Dart dev and 2.10.0.
+ # against Dart dev and stable.
analyze:
runs-on: ubuntu-latest
strategy:
- fail-fast: false
matrix:
sdk: [dev]
- version: [latest]
- include:
- - sdk: stable
- version: 2.10.0
steps:
- uses: actions/checkout@v2
- - uses: cedx/setup-dart@v2 # TODO(dart-lang/setup-dart#3): use the official setup-dart action
+ - uses: dart-lang/setup-dart@v0.5
with:
- release-channel: ${{ matrix.sdk }}
- version: ${{ matrix.version }}
+ sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
@@ -38,32 +32,22 @@
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
- run: dart analyze --fatal-infos
+ run: dart analyze
if: always() && steps.install.outcome == 'success'
- # Run tests on a matrix consisting of two dimensions:
- # 1. OS: ubuntu-latest, (macos-latest, windows-latest)
- # 2. release channel: dev, stable
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
- # Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
- sdk: [dev]
- version: [latest]
- include:
- - os: ubuntu-latest
- sdk: stable
- version: 2.10.0
+ sdk: [stable, dev]
steps:
- uses: actions/checkout@v2
- - uses: cedx/setup-dart@v2 # TODO(dart-lang/setup-dart#3): use the official setup-dart action
+ - uses: dart-lang/setup-dart@v0.5
with:
- release-channel: ${{ matrix.sdk }}
- version: ${{ matrix.version }}
+ sdk: ${{ matrix.sdk }}
- id: install
name: Install dependencies
run: dart pub get
@@ -71,5 +55,5 @@
run: dart test --platform vm
if: always() && steps.install.outcome == 'success'
- name: Run Chrome tests
- run: dart test --platform chrome -j1
+ run: dart test --platform chrome
if: always() && steps.install.outcome == 'success'