chore: add CI (#7)

This commit is contained in:
Aleksey Kulikov 2021-10-27 14:53:43 +03:00
parent f8c7c81d09
commit e86aba9f56

51
.github/workflows/master.yml vendored Normal file
View file

@ -0,0 +1,51 @@
name: Dart CI analyze and test
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
sdk: dev
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze source code
run: dart analyze --fatal-infos
test:
needs: analyze
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
sdk: dev
- name: Install dependencies
run: dart pub get
- name: Download libgit2 library
run: dart run libgit2dart:setup
- name: Run tests
run: dart test