From 971af35d94d6888885fb09865d5ae9ed4f9be7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20A=C3=9Fmann?= Date: Sat, 12 Dec 2020 12:22:19 +0100 Subject: [PATCH 1/3] Create automated build workflow Sets up an automated workflow to build and test the dart project with Pub. --- .github/workflows/dart.yml | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/dart.yml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml new file mode 100644 index 0000000..372827d --- /dev/null +++ b/.github/workflows/dart.yml @@ -0,0 +1,41 @@ +name: Dart + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + + # Note that this workflow uses the latest stable version of the Dart SDK. + # Docker images for other release channels - like dev and beta - are also + # available. See https://hub.docker.com/r/google/dart/ for the available + # images. + container: + image: google/dart:latest + + steps: + - uses: actions/checkout@v2 + + - name: Print Dart SDK version + run: dart --version + + - name: Install dependencies + run: dart pub get + + # Uncomment this step to verify the use of 'dart format' on each commit. + # - name: Verify formatting + # run: dart format --output=none --set-exit-if-changed . + + # Consider passing '--fatal-infos' for slightly stricter analysis. + - name: Analyze project source + run: dart analyze + + # Your project will need to have tests in test/ and a dependency on + # package:test for this step to succeed. Note that Flutter projects will + # want to change this to 'flutter test'. + - name: Run tests + run: dart test From aade3d2896cefd1cbd005ff8bd6c4440ada3f064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20A=C3=9Fmann?= Date: Sat, 12 Dec 2020 13:02:05 +0100 Subject: [PATCH 2/3] Update dart.yaml Use 'flutter test' instead of 'dart test' and 'flutter pub get' instead of 'dart pub get' --- .github/workflows/dart.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 372827d..4310c5e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -24,7 +24,7 @@ jobs: run: dart --version - name: Install dependencies - run: dart pub get + run: flutter pub get # Uncomment this step to verify the use of 'dart format' on each commit. # - name: Verify formatting @@ -38,4 +38,4 @@ jobs: # package:test for this step to succeed. Note that Flutter projects will # want to change this to 'flutter test'. - name: Run tests - run: dart test + run: flutter test From 3edf507725dba4e6abbb5555adb2ac23b5c50790 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20A=C3=9Fmann?= Date: Sat, 12 Dec 2020 13:07:48 +0100 Subject: [PATCH 3/3] Update dart.yaml Add flutter container to action --- .github/workflows/dart.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 4310c5e..c6368ab 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -15,7 +15,7 @@ jobs: # available. See https://hub.docker.com/r/google/dart/ for the available # images. container: - image: google/dart:latest + image: cirrusci/flutter:stable steps: - uses: actions/checkout@v2