Create dart.yml (#383)

This commit is contained in:
Michael Thomsen 2020-11-03 22:12:47 +01:00 committed by GitHub
parent cb1c0ea8b3
commit 8e353d4675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 49 additions and 0 deletions

49
.github/workflows/dart.yml vendored Normal file
View File

@ -0,0 +1,49 @@
name: Dart
on:
# Run CI on pushes to the master branch, and on PRs against master.
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# Check code formating and static analysis on a single OS (linux)
# against Dart stable and dev.
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cedx/setup-dart@v2
with:
release-channel: stable
- name: Report version
run: dart --version
- name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze code
run: dart analyze
# Run tests on a matrix consisting of three dimensions:
# 1. OS: mac, windows, linux
# 2. release channel: stable, dev
# 3. TODO: Dart execution mode: native, web
test:
needs: analyze
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [stable, dev]
steps:
- uses: actions/checkout@v2
- uses: cedx/setup-dart@v2
- name: Report version
run: dart --version
- name: Install dependencies
run: dart pub get
- name: Run tests
run: dart test