mirror of https://github.com/grpc/grpc-dart.git
Create dart.yml (#383)
This commit is contained in:
parent
cb1c0ea8b3
commit
8e353d4675
|
@ -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
|
Loading…
Reference in New Issue