From e86aba9f5685e2a397e6605a2406cf8470a667dc Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Wed, 27 Oct 2021 14:53:43 +0300 Subject: [PATCH] chore: add CI (#7) --- .github/workflows/master.yml | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/master.yml diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml new file mode 100644 index 0000000..c4bdf32 --- /dev/null +++ b/.github/workflows/master.yml @@ -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