mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
chore: add CI (#7)
This commit is contained in:
parent
f8c7c81d09
commit
e86aba9f56
1 changed files with 51 additions and 0 deletions
51
.github/workflows/master.yml
vendored
Normal file
51
.github/workflows/master.yml
vendored
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue