Skip to content

Commit

Permalink
👷 Update configuration related files (#1091)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 authored Feb 23, 2024
1 parent 6873731 commit d5cab74
Show file tree
Hide file tree
Showing 53 changed files with 36 additions and 1,736 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cronet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ jobs:
working-directory: 'pkgs/${{ matrix.package }}'
run: flutter pub get
- name: Check formatting
if: always() && steps.install.outcome == 'success'
working-directory: 'pkgs/${{ matrix.package }}'
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'
- name: Analyze code
if: always() && steps.install.outcome == 'success'
working-directory: 'pkgs/${{ matrix.package }}'
run: flutter analyze --fatal-infos
if: always() && steps.install.outcome == 'success'
- name: Run tests
uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2
if: always() && steps.install.outcome == 'success'
Expand All @@ -66,4 +66,4 @@ jobs:
arch: x86_64
target: ${{ matrix.package == 'cronet_http_embedded' && 'default' || 'google_apis' }}
profile: pixel
script: cd 'pkgs/${{ matrix.package }}/example' && flutter test --timeout=1200s integration_test/
script: cd pkgs/${{ matrix.package }}/example && flutter test --timeout=1200s integration_test/
57 changes: 17 additions & 40 deletions .github/workflows/cupertino.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,37 @@ on:
- main
- master
paths:
- '.github/workflows/cupertino.yml'
- 'pkgs/cupertino_http/**'
- 'pkgs/http_client_conformance_tests/**'
- '.github/workflows/cupertino.yml'
pull_request:
paths:
- '.github/workflows/cupertino.yml'
- 'pkgs/cupertino_http/**'
- 'pkgs/http_client_conformance_tests/**'
- '.github/workflows/cupertino.yml'
schedule:
- cron: "0 0 * * 0"

env:
PUB_ENVIRONMENT: bot.github

jobs:
analyze:
name: Lint and static analysis
runs-on: ubuntu-latest
verify:
name: Format & Analyze & Test
runs-on: macos-latest
defaults:
run:
working-directory: pkgs/cupertino_http
strategy:
matrix:
# Test on the minimum supported flutter version and the latest
# version.
flutter-version: ["3.16.0", "any"]
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
with:
flutter-version: ${{ matrix.flutter-version }}
channel: 'stable'
- id: install
name: Install dependencies
Expand All @@ -40,48 +46,19 @@ jobs:
# This approach is simpler than using `find` and excluding that file
# because `dart format` also excludes other file e.g. ones in
# directories start with '.'.
run: >
mv lib/src/native_cupertino_bindings.dart lib/src/native_cupertino_bindings.tmp &&
dart format --output=none --set-exit-if-changed . &&
run: |
mv lib/src/native_cupertino_bindings.dart lib/src/native_cupertino_bindings.tmp
dart format --output=none --set-exit-if-changed .
mv lib/src/native_cupertino_bindings.tmp lib/src/native_cupertino_bindings.dart
if: always() && steps.install.outcome == 'success'
- name: Analyze code
run: flutter analyze --fatal-infos
if: always() && steps.install.outcome == 'success'

test:
# Test package:cupertino_http use flutter integration tests.
needs: analyze
name: "Build and test"
strategy:
matrix:
# Test on the minimum supported flutter version and the latest
# version.
flutter-version: ["3.16.0", "any"]
runs-on: macos-latest
defaults:
run:
working-directory: pkgs/cupertino_http/example
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9
with:
model: 'iPhone 8'
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
with:
flutter-version: ${{ matrix.flutter-version }}
channel: 'stable'
- name: Run tests
# TODO: Remove the retries when
# https://github.com/flutter/flutter/issues/121231 is fixed.
# See https://github.com/dart-lang/http/issues/938 for context.
run: |
for i in {1..6}
do
flutter test integration_test/main.dart && break
if [ $i -eq 6 ]
then
exit 1
fi
echo "Retry $i"
done
cd example
flutter pub get
flutter test --timeout=1200s integration_test/
31 changes: 6 additions & 25 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
- main
- master
paths:
- 'pkgs/java_http/**'
- 'pkgs/http_client_conformance_tests/**'
- '.github/workflows/java.yml'
- 'pkgs/http_client_conformance_tests/**'
- 'pkgs/java_http/**'
pull_request:
paths:
- 'pkgs/java_http/**'
- 'pkgs/http_client_conformance_tests/**'
- '.github/workflows/java.yml'
- 'pkgs/http_client_conformance_tests/**'
- 'pkgs/java_http/**'
schedule:
# Runs every Sunday at midnight (00:00 UTC).
- cron: "0 0 * * 0"
Expand All @@ -22,8 +22,8 @@ env:
PUB_ENVIRONMENT: bot.github

jobs:
analyze:
name: Lint and static analysis
verify:
name: Format & Analyze & Test
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -33,35 +33,16 @@ jobs:
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
with:
channel: 'stable'

- id: install
name: Install dependencies
run: dart pub get

- name: Check formatting
run: dart format --output=none --set-exit-if-changed .
if: always() && steps.install.outcome == 'success'

- name: Analyze code
run: dart analyze --fatal-infos
if: always() && steps.install.outcome == 'success'

test:
needs: analyze
name: Build and test
runs-on: ubuntu-latest
defaults:
run:
working-directory: pkgs/java_http

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
with:
channel: 'stable'

- name: Build jni dynamic libraries
run: dart run jni:setup

- name: Run tests
run: dart test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.idea/
.vscode/

# Don’t commit the following directories created by pub.
.dart_tool
.packages
pubspec.lock
pubspec_overrides.yaml
4 changes: 3 additions & 1 deletion pkgs/cronet_http/cronet_http.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart Packages" level="project" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
</component>
</module>
</module>
File renamed without changes.
3 changes: 0 additions & 3 deletions pkgs/cronet_http/example/android/local.properties

This file was deleted.

4 changes: 3 additions & 1 deletion pkgs/cupertino_http/cupertino_http.iml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
<excludeFolder url="file://$MODULE_DIR$/.idea" />
<excludeFolder url="file://$MODULE_DIR$/.pub" />
<excludeFolder url="file://$MODULE_DIR$/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.pub" />
<excludeFolder url="file://$MODULE_DIR$/example/build" />
<excludeFolder url="file://$MODULE_DIR$/example/.dart_tool" />
</content>
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Dart Packages" level="project" />
<orderEntry type="library" name="Dart SDK" level="project" />
<orderEntry type="library" name="Flutter Plugins" level="project" />
</component>
</module>
</module>
70 changes: 0 additions & 70 deletions pkgs/cupertino_http/example/android/app/build.gradle

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit d5cab74

Please sign in to comment.