From 11abd3b9e2831d3ff355487fcb6eb4dd68ad8bde Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:29:37 +0200 Subject: [PATCH 1/8] Create dart.yml Test distant dart compilation --- .github/workflows/dart.yml | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 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..7d507ca --- /dev/null +++ b/.github/workflows/dart.yml @@ -0,0 +1,42 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Dart + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + # Note: This workflow uses the latest stable version of the Dart SDK. + # You can specify other versions if desired, see documentation here: + # https://github.com/dart-lang/setup-dart/blob/main/README.md + # - uses: dart-lang/setup-dart@v1 + - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 + + - 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 6d03ad5def542e8a6411807f30a0082919bcfd98 Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:40:50 +0200 Subject: [PATCH 2/8] Update dart.yml --- .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 7d507ca..ad05dcf 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -25,7 +25,7 @@ jobs: - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 - name: Install dependencies - run: dart pub get + run: cd WeatherApp_proj && flutter pub get # Uncomment this step to verify the use of 'dart format' on each commit. # - name: Verify formatting From fd067524675d4c0d0169a99c13fb945a306ae02a Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:41:47 +0200 Subject: [PATCH 3/8] Update dart.yml --- .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 ad05dcf..1e042d0 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -25,7 +25,7 @@ jobs: - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 - name: Install dependencies - run: cd WeatherApp_proj && flutter pub get + run: ls && flutter pub get # Uncomment this step to verify the use of 'dart format' on each commit. # - name: Verify formatting From 8b5a459dfadb831da1a59c1b99b1e25d45964d57 Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:42:54 +0200 Subject: [PATCH 4/8] Update dart.yml --- .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 1e042d0..11b9410 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -25,7 +25,7 @@ jobs: - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 - name: Install dependencies - run: ls && flutter pub get + run: cd weatherApp_proj && dart pub get # Uncomment this step to verify the use of 'dart format' on each commit. # - name: Verify formatting From 3ed443b7e7ea396ce4cfcab47a781e0c66f8b653 Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:46:32 +0200 Subject: [PATCH 5/8] Update dart.yml to flutter action --- .github/workflows/dart.yml | 34 +++++++++------------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 11b9410..24770ae 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -15,28 +15,12 @@ jobs: build: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - # Note: This workflow uses the latest stable version of the Dart SDK. - # You can specify other versions if desired, see documentation here: - # https://github.com/dart-lang/setup-dart/blob/main/README.md - # - uses: dart-lang/setup-dart@v1 - - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 - - - name: Install dependencies - run: cd weatherApp_proj && 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 +steps: + - name: Clone repository + uses: actions/checkout@v4 + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version-file: pubspec.yaml # path to pubspec.yaml + - run: flutter --version From 37c3a36ecfc6fcb0df9d2ed3fc4d0a7b9f9f92d5 Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:48:54 +0200 Subject: [PATCH 6/8] Update dart.yml --- .github/workflows/dart.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 24770ae..d96861a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -15,12 +15,12 @@ jobs: build: runs-on: ubuntu-latest -steps: - - name: Clone repository - uses: actions/checkout@v4 - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - flutter-version-file: pubspec.yaml # path to pubspec.yaml - - run: flutter --version + steps: + - name: Clone repository + uses: actions/checkout@v4 + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version-file: pubspec.yaml # path to pubspec.yaml + - run: flutter --version From a0c5d843faebb063e6f949a799e5af2dc857c184 Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:49:55 +0200 Subject: [PATCH 7/8] Update dart.yml --- .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 d96861a..fad0f09 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -22,5 +22,5 @@ jobs: uses: subosito/flutter-action@v2 with: channel: stable - flutter-version-file: pubspec.yaml # path to pubspec.yaml + flutter-version-file: weatherApp_proj/pubspec.yaml - run: flutter --version From f6bb3f9a1115b4a4566069d4eb9866d282afa26a Mon Sep 17 00:00:00 2001 From: Thomas Griffith Date: Sun, 16 Jun 2024 23:53:10 +0200 Subject: [PATCH 8/8] Fix flutter install issue --- .github/workflows/dart.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index fad0f09..933c21a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -18,6 +18,8 @@ jobs: steps: - name: Clone repository uses: actions/checkout@v4 + - name: Fix flutter SDK folder permission + run: git config --global --add safe.directory /tmp/flutter/-- - name: Set up Flutter uses: subosito/flutter-action@v2 with: