diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..cee80ad --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,38 @@ +name: Testing + +on: + push: + pull_request: + types: [opened, reopened, ready_for_review] + +jobs: + flutter: + runs-on: ubuntu-latest + container: cirrusci/flutter:1.22.6 + + steps: + - uses: actions/checkout@v2 + + - name: Get Dependencies + run: flutter pub get + + - name: Format + run: flutter format --set-exit-if-changed lib test + + - name: Analyze + run: flutter analyze + + - name: Testing + run: flutter test --coverage + + - name: Generate Coverage Report + uses: danielpalme/ReportGenerator-GitHub-Action@4.8.9 + with: + reports: 'coverage/lcov.info' + targetdir: 'coverage_report' + + - name: Upload Coverage Report + uses: actions/upload-artifact@v2 + with: + name: coverage_report + path: coverage_report diff --git a/.gitignore b/.gitignore index 1985397..d998833 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ .pub-cache/ .pub/ build/ +coverage/ # Android related **/android/**/gradle-wrapper.jar