Skip to content

Commit

Permalink
github action
Browse files Browse the repository at this point in the history
  • Loading branch information
MelbourneDeveloper committed Sep 7, 2024
1 parent 2d4b9bb commit 38b941b
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 42 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: build_and_test

on:
pull_request:
branches: [main]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.24.2"
channel: "stable"
architecture: x64

- name: Get Dependencies
run: flutter pub get

- name: Analyze
run: dart analyze --no-fatal-warnings

- name: Check Formatting
run: dart format lib test --set-exit-if-changed

- name: Run Tests
run: flutter test --coverage

- name: Check Test Coverage
uses: VeryGoodOpenSource/very_good_coverage@v2

with:
path: 'src/Flutter/coverage/lcov.info'
min_coverage: 28.9
42 changes: 0 additions & 42 deletions .github/workflows/ci.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ build/
**/ios/.generated/
**/ios/Flutter/Generated.xcconfig
**/ios/Runner/GeneratedPluginRegistrant.*

charts_flutter/coverage/
7 changes: 7 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
cd charts_flutter

flutter test --update-goldens --coverage

lcov ./coverage --output-file ./coverage/lcov.info --capture --directory

genhtml ./coverage/lcov.info --output-directory ./coverage/html

0 comments on commit 38b941b

Please sign in to comment.