Skip to content

update ci/cd

update ci/cd #33

Workflow file for this run

name: Dart Package
on:
push:
branches:
- master,
- 'release/**'
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: dart analyze --fatal-warnings --fatal-infos --verbose .
- name: Activate code coverage
run: dart pub global activate coverage
- name: Analyze code coverage
run: dart pub global run coverage:test_with_coverage
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
sdk: [stable, 2.17.0]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1.0
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: Run tests
run: dart test
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Publish project
run: dart pub publish --dry-run